Jump to content

Triying to control a servo with PWM


jps

Recommended Posts

Hello. I am trying to control a servo, and after a lot of mistakes and hits in the face... finally i can move it with WiringOP (https://github.com/zhaolei/WiringOP)

I use one of the examples called servo.c and the servo moves to one side and another. This is the first step, but the servo makes weirds movements. Watch this video.

Any iddeas why? Any other way to control a servo?

I am not C expert, some way to do it with Python?

Thank you very much in advance.

servo.c

Link to comment
Share on other sites

But Raspberry can manage it perfectly... I tried with WiringOP, WiringBP compatible con Banana Pi, orangepi_PC_gpio_pyH3... I think is more a library problem than a Linux problem.

Link to comment
Share on other sites

Can the Raspberry 'manage it perfectly' on any pin, or just one? As IIRC, the rPi has one dedicated PWM capable pin, which should be stable... not sure about the oPi? I'm not saying there aren't  library, hardware and configuration differences that could be causing the problem, just that I know that is one possible reason for this variance. 

Link to comment
Share on other sites

Orange Pi have a pin called PWM1 (PA6 - pin number 7) so it must be able to manage PWM. In script.bin configuration file it can be enabled and disebled... So must be possible. Still looking for a way to do it. Thank you guys.

Link to comment
Share on other sites

Yes, PA5 is the middle pin of the serial debug port. I can move "weirdly" the servo from PA6, this pin of the serial debug port and pin 10, but i can not control the tremor movements...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines