|
Re: Please help with our IR code, we are so confused
That version of our code is a tad outdated.
The digital ins are no longer being set to zero if their total is greater than one; when they are greater than one, move is now set to zero.
Changing it to static may fix it, so we'll try that.
If any of you are still confused- Its supposed to "remember" what button was last pushed (stored in move), but the variable move changes only when a button is pressed, then it immediately goes back to one.
The IR sensor IS hooked up right, and the printfs show that dig ins are zero until a button is pressed, when it gets a 1 every 100ms.
|