0

I have a servo connected to my RPi and I try PWM.Servo's capabilities. The program below does what it should - but after execution it crashes system (it doesn't respond to any input, no animations, nothing). I sincerely have no idea how to solve this.

from RPIO import PWM
import time

servo = PWM.Servo()

servo.set_servo(15, 1200)
time.sleep(5)
servo.set_servo(15, 2000)
time.sleep(5)

servo.stop_servo(15)

Unfortunately, I haven't found anything on the internet to help me. Any ideas?

EDIT: Today I have found that the problem occurs even without servo.stop_servo(). Programs that do not use PWM.Servo are working OK though. But when I run the program from terminal (sudo python /home/pi/Desktop/servo.py) it works like a charm. Why does it crush system when run on IDLE?

  • Does this happen when the servo is disconnected from the RPi or only when it is connected? – Craig Apr 7 '14 at 21:28
  • @Craig it doesn't matter if it is connected – Michał Apr 8 '14 at 6:27
  • Does the version of IDLE you have installed match the version number from typing "python -V" at the terminal? It's possible there is a version mismatch between the two and this sounds similar to a problem I had because of it. – Matt McCarragher Jun 10 '14 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.