-
Notifications
You must be signed in to change notification settings - Fork 0
A low-power delay for Arduino
License
brabl2/delayIdle
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
delayIdle ============= A low-power delay for Arduino Using the delayIdle() function most common AVR chips consume approx. 1/2 of the power when compared to the original Arduino delay() function. ATmega328p@8MHz@5V : delay()=13.5mA delayIdle()=8mA ATmega328p@8MHz@3.3V : delay()=3.72mA delayIdle()=1.35mA ATmega328p@1MHz@3.3V : delay()=1.17mA delayIdle()=0.53mA Putting the CPU to SLEEP_MODE_IDLE causes some inaccuracy in the time when the CPU returns from the delayIdle() function, however in most cases the small inaccuracy is acceptable. The inaccuracy depends mostly on TIMER0 overflow, which depends on CPU frequency : 1ms @ 16MHz, 2ms @ 8MHz, 16ms @ 1MHz
About
A low-power delay for Arduino
Resources
License
Stars
Watchers
Forks
Releases
No releases published