led cube quick questions

So i am making a led cube, and i need to control all ledds individually, if i want to turn on or off a light can i do this

void setup() {
  

pinMode(A15, OUTPUT);
pinMode(A14, OUTPUT);
}

void loop() {
  
  digitalWrite(A15,HIGH);
  digitalWrite(A14,LOW);

}

if i connect the anode of the led to A15 and cathode to A14, can i safely use the digitalWrite function to control the led? any problems with this?

If you also include a resistor, yes.

i am making a led cube, and i need to control all ledds individually, if i want to turn on or off a light can i do this

How many LEDs are there in this cube and how are they wired ?

i have a led cube with 5 layers, to choose the layer i want to switch the ground pin to the different layers, but it has to switch really fast, is there a component i can electronically use as a switch?

something like this?

A transistor, darlington or logic-level MOSFET. Google "low side switching transistor" or such.

With 5x5x5 cube there might be 20mA x 25 = 0.5A per layer to switch, which is getting close to
the limit for a single transistor - a darlington or logic-level MOSFET might be a safer bet (MOSFET
should run cooler with less voltage wasted).

Hi,
Have you looked at what the other LED cubists use on their projects?

google driving LED cubes

Tom.... :slight_smile:

You were told not to cross-post.
https://forum.arduino.cc/index.php?topic=524151.0

It might be wise to post a complete diagram of that cube instead of a camera tripod.
If you're using 74HC595 shift registers for the cathodes, consider replacing them with the TPIC6B595.
That chip is (almost) the same as the 74HC595, but has stronger mosfet outputs.
Leo..

Moderator merged related topics