Hi, I am trying to control 2 servos from my pca9685 which is connected to my raspberry pi. I have written code that works with key inputs like I want, but I am only able to use one key input, and then I don’t get a response after the first key input. Any idea on how to fix the issue?
import time
import adafruit_servokit import ServoKit
kit = ServoKit(channels=8)
key = input()
angle = 0
while angle <= 100:
if key == "a":
kit.servo[0].angle = 100
time.sleep(1)
elif key = "aa":
kit.servo[0].angle = 0
time.sleep(1)