laptophead
Well-known member
I wrote this simple Servo algorithm based on a DC motor bringing a pot back to the central value.
While the (GapFront >= 50) gives me a clean 200 PWM, the other condition (GapFront <= -50) gives me a scrambled signal.
I included the pics of the nice and bad PWM.
What I tried and did not work:
Moved pin 22 to pin 2.
Used a 100 digitalWrite val instead of 200;.
Please help.
Thanks a lot.
While the (GapFront >= 50) gives me a clean 200 PWM, the other condition (GapFront <= -50) gives me a scrambled signal.
I included the pics of the nice and bad PWM.
What I tried and did not work:
Moved pin 22 to pin 2.
Used a 100 digitalWrite val instead of 200;.
Please help.
Thanks a lot.