I’m trying to use the Pan Tilt Hat with my Raspberry Pi using the module curses. Im having a tough time figuring out the code to make the Hat move with the arrow keys. I’m running a While True loop.
If char == curses.KEY_UP:
For each instance I want the Servo to move up. My problem is that the x value will always reset to 0 after the instance is completed. Is there a way to fix this?