|
Re: encoder vs. motor
Quote:
|
Originally Posted by stephenthe1
Our team doesn't really have any mentors for programming. We never have, last year we had a wiz kid, and this year its kinda up to me and another guy. neither of us have much experience.
|
We'll be your mentors.  There are quite a few of us to help you out.
Quote:
|
Originally Posted by stephenthe1
if I initialize it as zero, won't the program simply reset encoder to zero every time it rereads the code?
|
That declaration only takes effect when the program starts. The use of "static" fixes it permanently in memory and that line will not get executed each time the routine is called. Without the "static" the variable would get initialized each time the routine is called.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 09-12-2004 at 18:58.
|