I tried to use the search, but couldn't find anything that would give me a definitive answers.
I'm currently using the arduino as a clock and running an array of LEDs for the display.
What I'm needing is battery backup for the board, and some a way to shut the LEDs off if the main power is lost.
1st) I understand that if I use the external power plug for the main power, and add the batteries with a modified USB cable to the USB plug, it would work.
Is this correct ?
2nd) What voltage should the batteries be ?
As we are talking about short power losses, I'm thinking about coincells.
Would 3V keep the arduino running, and if not, is 6V to the USB too much ?
3rd) Now, in the event that the power is cut for a longer time, is there a command in code I could use to shut the LEDs off to save power ?
Also, I understand that this piece of code should make the arduino run at 2MHz, thus saving power ?
TCCR2A = 0;
TCCR2B = 0<<CS22 | 1<<CS21 | 0<<CS20;
TIMSK2 = 1<<TOIE2;
TCNT2=0;