my concern with that is power consumption. I plan to run this on batteries. With 13 resistors connected internally between 5v and ground, i would expect power consumption to increase. Would you agree?
Let me give you a better idea of what my project is.
My little boy loves plugs, buttons and knobs. I have build a box that has 4 high output LEDs, 3 pushbuttons, 3 1/4inch head for jacks, a 1/4 male connector attached to a wire, and a variable resistor with a big knob on it.
depending on which plug the wire is plugged into the buttons will have a different functions (games). Currently plug 1 is simple, a button pushed will light up the matching LED. Plug 2 is a matching game. An LED lights up and a tone is played, the user needs to press the correct button. Plug 3 is a memory game where a sequence of lights and sounds gets longer with each correct answer. (Like old school Simon Says).
My primary goal is to not need to replace the batteries every 6 hours ;)
Other parts of the sketch i am still working on;
- basic sleep after a period of no activity
- reducing the clockspeed from 16hz to something lower ( heard this really reduce power consumption)
- using interrupts when a button is pushed instead of polling them constantly.
Issues that are much lower in my list
- Start up time after sleep (no need for it to be instant)
- brownouts caused by too low of a battery voltage.
I'm not sure if i'm giving you too much information on not enough as i'm starting to deviate from my original question. If you'd like to take a look at the sketch, please let me know. It's nothing fantastic but I'm sure you could find a lot of ways to clean it up.