androidthings / drivers-samples

Peripheral driver samples
Apache License 2.0
153 stars 57 forks source link

PWMServo sample not working with Raspberry Pi 3 #2

Closed rno closed 7 years ago

rno commented 7 years ago

Hello,

I can't get the pwmservo sample running. The servo I'm using works properly (I tried with an Arduino Uno).

As a side note, I also tried the other pwn sample without success.

proppy commented 7 years ago

@rno can you share a picture on how you wired the servo to the Raspberry Pi?

rno commented 7 years ago

@proppy, here's the picture of my wiring:

img_20161220_072649

Sorry for the cables colors not matching the ones from the servo, that the only ones left I have.

jdkoren commented 7 years ago

@rno The wiring looks correct to me. You may have to change some code in the sample app to match the specifications of the servo; in particular, you may need to call setPulseDurationRange(0.5, 2.5) based on the technical details listed here. Can you give that a try and let us know if that helps?

rno commented 7 years ago

Hi @jdkoren, it still does not work for me :-/

jdkoren commented 7 years ago

@rno Do you have another Servo you can try? Perhaps you can also try a different PWM pin?

rno commented 7 years ago

Ok, I just removed a servo from another project to test it and it works.

I still don't understand why the other one is not working even though it's working fine on the Arduino...

Sorry for the trouble and thanks a lot for your help!

proppy commented 7 years ago

@rno can you tell us which servo library (if any) you were using w/ the UNO?

rno commented 7 years ago

@proppy, I'm using the arduino servo library, without changing the min and max (it worked out of the box).

Sorry for replying only now.