Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
pymata_aio_pymata3_example
#!/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
board.sleep(3)
# reset the board and exit
board.shutdown()
if __name__ == "__main__":
pin_6_pwm_128()
@metracy

This comment has been minimized.

Show comment Hide comment
@metracy

metracy Apr 14, 2018

Where do you set the com port the arduino is located on?

metracy commented Apr 14, 2018

Where do you set the com port the arduino is located on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment