My l298n motor driver that is hooked up to my rpi beeps and the motors don't move when i run code how ever i worked before a changed the power pack however now it doesn't work with that one either.
Here's my code:
# import curses import curses # Get the curses window, turn off echoing of keyboard to screen, turn on # instant (no waiting) key response, and use special values for cursor keys screen = curses.initscr() curses.noecho() curses.cbreak() screen.keypad(True) try: while True: char = screen.getch() if char == ord('q'): break elif char == curses.KEY_UP: print "up" elif char == curses.KEY_DOWN: print "down" elif char == curses.KEY_RIGHT: print "right" elif char == curses.KEY_LEFT: print "left" elif char == 10: print "stop" finally: #Close down curses properly, inc turn echo back on! curses.nocbreak(); screen.keypad(0); curses.echo() curses.endwin()
And my setup: photos will be up later sorry i gotta stop using google drive