Hi.
When I do X = millis();
X is going up to some thing like 32000 and then to 0 agian...
Can I tell millis() to go to 0 befor? like after 20000 millisec?
Hi.
When I do X = millis();
X is going up to some thing like 32000 and then to 0 agian...
Can I tell millis() to go to 0 befor? like after 20000 millisec?
What version are you running?
Define X to be of type 'unsigned long' instead of 'int', int gets to a maximum of 32768 before restarting at 0.
Here's a forum topic about it:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1167861718
int gets to a maximum of 32768
"32767"
"32767"
Close..........
Thanks, it worked fine when I define it a positive long.