Pages: [1]   Go Down
Author Topic: [Library] Blink's without delay  (Read 1224 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 74
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
What i can improve?
- A more elaborated description how to use it
- write a playground article for example.
- use zip for compression (as not everyone has rar)
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Jr. Member
**
Karma: 0
Posts: 74
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tks frind... I improve..
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


- some sample code
- information if it is usable for older versions of Arduino e.g. 0.22
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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)
Code:
uint32_t now = micros();
if (now - lastDisplay >= 1000000UL)
{
   lastDisplay = now;
   lcd.print("blablabla");
}
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: