July 9, 2008
Ok so I finally had an AHA moment about why my servos "weren't working". My servos would just jerk and not do much. I tried my perf board that I wired up for my manual transmission robot. I tried a 28x1 project board with the same result. Well tonight I finally figured it out.
It was code. (prepare to laugh) Between servo commands I was using sleep 100. I was assuming this was 100 milliseconds. It is actually something like 200 seconds. I changed them to wait 1 (which is wit one second) and they now work.
I wanted to admit my mistake so others learn that you shouldnt always assume your code isnt the problem. My code looks very simple, but since I didn't fully understand the sleep command and it wasted me hours of tinkering. Always double check your code (line by line and UNDERSTAND it) and check your wiring.