Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env python3
from pymata_aio.pymata3 import PyMata3
from pymata_aio.constants import Constants
def pin_6_pwm_128():
Set digital pin 6 as a PWM output and set its output value to 128
@return: No Value Returned.
# instantiate the pymata_core API
board = PyMata3()
# set the pin mode
board.set_pin_mode(6, Constants.PWM)
board.analog_write(6, 128)
# wait for 3 seconds to see the LED lit
# reset the board and exit
if __name__ == "__main__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment