Short question: Is it safe to connect a single Arduino ADK (Mega) output pin at 0v to 25 LEDs, each with an appopriate 100 ohm resistor, and each being powered by a output pin at 5v?
i.e. 25 output pins at 5v each connected to an anode of one of 25 LEDs with all of their cathodes going to a single input pin at 0v
Also will I need to use transistors to provide enough power?
Long question: I'm working on a 5x5x5 LED cube similar to this: The 4x4x4 LED cube (Arduino)
There's 5 levels of 25 LEDs, and using multiplexing I intend to switch between each level very quickly to give the impression they are all on at the same time. How I understand it is this is achieved by connecting each of the 25 anode pins to the anode of the LED on the above level and connecting all of the cathodes on the same level to one another. So with 25 anode pins and 5 cathode pins, if I switch the bottom level cathode pin to 0v and all the other level's cathodes pins to 5v I can then turn on individual LEDs on the bottom level by turning on the appropriate anode pin.
If there's any maths involved the LEDs are 20mA, and the Arduino provides 40mA per pin I think. I have a feeling I'm also going to have to use transistors to properly power this as 25 LEDs is 500mA and I have heard that the ADK only provides up to 200mA, though the project I have linked to doesn't seem to do this?