Page 1 of 1

RPIO problems

Posted: Fri Jun 05, 2015 9:53 pm
by freefall98
Hi all,

I'm trying to use my Raspberry Pi B+ to generate a PWM signal. From the documentation (https://pythonhosted.org/RPIO/pwm_py.html), it says that "each DMA channel is setup with a specific subcycle, within which pulses are added, and which will be repeated endlessly," yet I'm having difficulty getting the signal to repeat endlessly.

I've tried a few things, and this is one example of something I believe ought to work:

Code: Select all

servo = PWM.Servo()
servo.set_servo(pwm_ctrl, 4000)
This ought to create a 4 ms pulse every 20 ms. And I get this, but only for 4 repetitions. Then it stops.

Am I misunderstanding something? Has anyone else run into this?

Thanks
-freefall98

Re: RPIO problems

Posted: Sat Jun 06, 2015 8:58 am
by B.Goode
I don't have an answer to your question.

But I can say from experience that both Servoblaster https://github.com/richardghirst/PiBits ... rvoBlaster by Richard Hirst and PiGPIO http://abyz.co.uk/rpi/pigpio/ by joan are able to implement pwm control of servos in order to manage 'hobby' servos like the Tower SG90. Both authors are contributors to these forums.