wizarcl
November 27, 2012, 5:07pm
1
Hi people,
i create a library to blink a led or other devices without delay... I'm now creating a library with various timers wich is i used in plc's...
Pls, test and tell me what you think.
What i can improve?
Tks...
http://code.google.com/p/arduino-blink-whitoutdelay-library/downloads/list
Ps. Sorry for my bad english.
system
November 29, 2012, 1:08pm
5
Nice, but what about millis buffer owerflow after 50 days?
Asking because I try it with micros and there is only 70 minutes to owerflow...
Nice, but what about millis buffer owerflow after 50 days?
if handled carefully by using subtractions one can circumvent most overflow failures.
give this code a (75 minute) try and you will see it works as expected (add setup and loop of course)
uint32_t now = micros();
if (now - lastDisplay >= 1000000UL)
{
lastDisplay = now;
lcd.print("blablabla");
}