Quote:
Originally Posted by robotrobot2
The TMR0H and TMR0L bytes are built into the processor. They execute regardless of the code, as does the interrupt.
|
You misunderstand me. The timer and timing functions will work just fine. Using floats on these robots makes me cringe, but it will work. But your wait(inp) function will kill the robot as sure as pulling the battery. The master processor HAS to be updated by user processor periodically, if you don't the watchdog timer goes off and the master processor kills the robot. If you enter your while loop there you can to NOTHING but wait and can't update the master processor. So the watchdog times out and the master processor kills the robot.
I'm making a fuss about this because it's one of the most common mistakes made by rookie programmers and I really would rather there wasn't code out there that made killing your robot as simple as calling a function.