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

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

src/p/y/PyMata-HEAD/examples/pymata_basics.py   PyMata(Download)
# Set the pin mode for a digital output pin
firmata.set_pin_mode(RED_LED, firmata.OUTPUT, firmata.DIGITAL)
# Turn on the RED LED
# Set the white led for pwm operation
firmata.set_pin_mode(WHITE_LED, firmata.PWM, firmata.DIGITAL)
# Set the white led to full brightness (255) for 1 second
# set potentiometer pin as an analog input
firmata.set_pin_mode(POTENTIOMETER, firmata.INPUT, firmata.ANALOG)
# allow some time for the first data to arrive from the Arduino and be
# set the button switch as a digital input
firmata.set_pin_mode(BUTTON_SWITCH, firmata.INPUT, firmata.DIGITAL)
# wait for the button switch to be pressed

src/p/y/PyMata-HEAD/examples/pymata_ping_config_and_read.py   PyMata(Download)
# configure a group of pins to control 8 LEDs

src/p/y/PyMata-HEAD/examples/pymata_software_data_latch.py   PyMata(Download)
# Setup pin A2 for input
firmata.set_pin_mode(POTENTIOMETER, firmata.INPUT, firmata.ANALOG)
# Setup pin pin 12 for the switch
firmata.set_pin_mode(BUTTON_SWITCH, firmata.INPUT, firmata.DIGITAL)