Created
June 1, 2014 03:50
-
-
Save mtomwing/2d2e0c4a383e5c89a050 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from BreakfastSerial import Arduino, Motor | |
def test(): | |
print 'hello world' | |
def setup(board): | |
motor = Motor(board, 3) | |
# Make it go counter-clockwise | |
board.digital[12].write(1) | |
motor.start(1) | |
while True: | |
speed = int(raw_input('speed: ') or 0) | |
if speed: | |
motor.speed = speed | |
else: | |
motor.stop() | |
break | |
if __name__ == '__main__': | |
board = Arduino() | |
print 'Done!' | |
setup(board) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment