Skip to content

Instantly share code, notes, and snippets.

@mtomwing
Created June 1, 2014 03:50
Show Gist options
  • Save mtomwing/2d2e0c4a383e5c89a050 to your computer and use it in GitHub Desktop.
Save mtomwing/2d2e0c4a383e5c89a050 to your computer and use it in GitHub Desktop.
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