Created
November 15, 2015 14:33
-
-
Save otknoy/df167c6f5f8b265b3e65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
from pyfirmata import Arduino | |
if __name__ == '__main__': | |
port = '/dev/ttyACM0' | |
board = Arduino(port) | |
r = board.get_pin('d:9:p') | |
g = board.get_pin('d:10:p') | |
b = board.get_pin('d:11:p') | |
while True: | |
for i in range(0, 128): | |
print(i) | |
r.write(i/128.0) | |
b.write(i/128.0) | |
g.write(i/128.0) | |
time.sleep(0.01) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment