You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defservo_install():
importtimedelay=1.0/180iflen(sys.argv) >=3:
print("servo-install takes no value")
usage()
print("Servo now is set to 90 degree.")
servo0=Servo.Servo(0, bus_number=1)
servo1=Servo.Servo(1, bus_number=1)
servo2=Servo.Servo(2, bus_number=1)
foriinrange(90, -1, -1):
servo0.write(i)
servo1.write(i)
servo2.write(i)
time.sleep(delay)
time.sleep(0.1)
foriinrange(0, 181, 1):
servo0.write(i)
servo1.write(i)
servo2.write(i)
time.sleep(delay)
time.sleep(0.1)
foriinrange(180, 89, -1):
servo0.write(i)
servo1.write(i)
servo2.write(i)
time.sleep(delay)
time.sleep(0.1)
servo0.write(90)
servo1.write(90)
servo2.write(90)
whileTrue:
time.sleep(1)
Notice the while True loop. Thus when I run the command picar servo-install it just sits there forever, I don't think I need to keep the python programming running after I've run the command successfully?
Thanks!
The text was updated successfully, but these errors were encountered:
It seems that the version of picar I have sits in an infinite loop.
File:
/usr/local/lib/python3.5/dist-packages/SunFounder_PiCar-1.0.1-py3.5.egg/picar/__init__.py
Notice the while True loop. Thus when I run the command
picar servo-install
it just sits there forever, I don't think I need to keep the python programming running after I've run the command successfully?Thanks!
The text was updated successfully, but these errors were encountered: