One quick question on the same code.
I put a 100ms delay at the very end of my code just so that I could see the numbers I was puting on the terminal. Aparently, it was screwing up the timing on my receiver input signal. I have it where the program calls the LStick routine which clears the timer, then times the pulse. Then, it returns a calculated output and I display it, THEN the delay happens.
The error is when ever the pulse itself takes less than 100 timer counts, it doesn't clear out and counts twice, giving me a bad output.
I just dont see how a delay at the end of my code could cause something to mess up when it clears the timer right before it starts and displays the result onscreen before the delay.
Oh, it was a 100ms delay, but if I take it down to 97ms, it is fine and works great again. Strange. Just so you know, I will take the delay out when I put together the real program for my robot, I'm just debugging right now and making sure everything works.
~Mike