Quote:
|
Originally Posted by Keith Watson
Is anything being displayed by your printf? You didn't mention anything about that.
This is exactly how we dump out joystick and pwm values. Saturday it showed us that one of our joysticks from last year had died. The only difference in our code syntax is this:
Code:
printf("Joystick1 X = %u\r\n", (int)p1_x);
printf("Joystick1 Y = %u\r\n", (int)p1_y);
The small twitch at startup comes from servo values being initialized, most to 127.
Also verify your joystick is plugged in to port 3 and your servo to pwm09.
By the way, the original version of the code has
|
the code _should_ have p3_x ... when i coppied my printf over i acidentaly changed it to p3_y
also the print statement works all right
it reads 130 centered though, but thats just being lazy with calibration
even the pwm out check works so im at a lose to explain why i get no motion
also the servo dosenotalways return to the same spot when it moves at first, even if the pwm out is fixed at 127 (joystick unplugged)