Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- init()
- stdscr = curses.initscr()
- curses.echo()
- try:
- while True:
- c = stdscr.getch()
- if c == curses.KEY_LEFT:
- forward()
- elif c == curses.KEY_RIGHT:
- back()
- else:
- print "not arrow"
- except KeyboardInterrupt:
- gpio.cleanup()
- print "Bye"
- sys.exit()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement