Anyone using an Arduino to control many LED signals or occupancy detectors might want to consider using shift registers, eg the 74hc595 and 74hc165.
A single Arduino can independently control hundreds (maybe thousands) of LEDs and occupancy detectors with shift registers, using only 3 or 4 pins.
Thay have their place. I'm not sure about thousands of outputs cascaded off 3 pins - get enough and there will be noticeable delays, especially when all you want to change is the 5th bit on the 20th shift register. Still need drivers unless you are using no more than 1 LED per line, as the 74HC495 output capacity per line is actually LESS than the Arduinos.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
The time it takes to load/unload a shift register is on the order of one tenth of a millisecond... So you could run fifty shift registers (that's 400 input/outputs) and still they'd be updating a couple hundred times per second. Plenty fast enough for any model railroading purposes.
As for output capacity, iirc a 595 can output max 70ma over its eight pins, so around 8ma per pin. Personally I run my signal LEDs a little lower than that as I feel it looks too bright to have them at their max current. So I run them straight off the 595.
Not saying it's the magic solution to all the world's problems, but if someone finds themselves needing more digital input or outputs on their arduino, it's something to consider.
Looks good. Get that knee taken care of. I had both knees done over a 4 year span. Best decision I ever made(at least medical wise)...
Jim
Modeling BNSF and Milwaukee Road in SW Wisconsin