Software > Software

Servo Half Speed Code

<< < (2/3) > >>

Would need to see the definition of your variable 'servo'

Well I'm using PD so its defined in there.   Center is 1500  range 600 - 2400 reverse direction not set

Also my servo is starting HIGH (starts constantly spinning at first).  I used -124 and 124 and that changed direction, but -64 and 64 doesnt.  Doesnt make sense.  The servo should be off too because  I wrote act_setSpeed(&servo,0); when no tempbyte received

Suggest you create a new very simple project that takes no inputs - ie its appControl just does an act_setSpeed for a given value.
eg just have the following in appControl
act_setSpeed(&servo, -64);

This way you know that the rest of your program isn't sending other values to the servo.

Ok this is weird.  It's like its not even responding to my code.  No other values are being sent.  I set the speed to zero if its not receiving a byte but it still keeps turning continuously.  When I continuously send it a value 124, it tries to slow down, but just keeps spinning, I dont understand. 

Would it have anything do with that I put a voltage regulator to step down my supply of 12v to a 5v the servo can handle?

Waittt I think I may have an idea of what it could be.    When I was modifying the servo with this tutorial
I didn't set the servo to zero and glue down the pot.  Could this be my problem?  I dont want to take my servo apart for nothing so some verification would be nice.    It seems like that would be the issue.



[0] Message Index

[#] Next page

[*] Previous page

Go to full version