I am testing my pan/tilt shield and have a couple of issues. In the code segment below, I tell it to pan - 5 degrees in 2 seconds and then I read the position.
Pan.angle(-5,2000)
current_pan = Pan.angle()
print (“Current pan angle is %s” % current_pan)
What happens is that the code does not wait for the servo to get to 5 degrees. It sends the command and then prints the position almost right away.
Question: Can I use a wait or do loop after issuing Pan.angle(-5,2000) to not move forward in the code until the movement is finished?