Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(25)  |  Call(14)  |  Derive(0)  |  Import(11)

src/p/y/Python-Arduino-Command-API-HEAD/examples.py   Python-Arduino-Command-API(Download)
#!/usr/bin/env python
from Arduino import Arduino
import time
 
 
def Blink(led_pin, baud, port=""):
    """
    Blinks an LED in 1 sec intervals
    """
    board = Arduino(baud, port=port)
    Arduino's analogWrite (PWM) function
    """
    board = Arduino(baud, port=port)
    i = 0
    while True:
    potentiometer.
    """
    board = Arduino(baud, port=port)
    while True:
        time.sleep(0.01)
    ultrasonic rangefinder connected to pw_pin
    """
    board = Arduino(baud, port=port)
    pingPin = pw_pin
    while True:

src/p/y/Python-Arduino-Command-API-HEAD/tests/test_main.py   Python-Arduino-Command-API(Download)
    def test_find(self):
        """ Tests auto-connection/board detection. """
        raw_input(
            'Plug in Arduino board w/LED at pin 13, reset, then press enter')
        from Arduino import Arduino
        board = None
        try:
            # This will trigger automatic port resolution.
            board = Arduino(9600)
            if not port:
                print 'You must enter a port.'
        from Arduino import Arduino
        board = None
        try:
            board = Arduino(9600, port=port)