I want to try taking on the project of a led cube with 6 faces each with a 3x3 matrix of LEDs, that is controlled by a gyroscope. Essentially, I want to make it so that one LED traverses through the matrix according to how the box is rotated. I was thinking using some 8-bit shift registers, but pretty sure they need 3 pins to operate. Any ideas?
What is diferente?
All cube has 6 faces.....
What arduino are using?
Do you don't have 3 pins?
Is that 54 LEDs in total, or are the LEDs on the edges and vertices shared by 2 or 3 faces? (That would make it only 26 LEDs, I think: 8 for the vertices, 12 for the edges and 6 for the faces.)
Yes, 3 pins, but you can cascade them so that 7 8-bit registers can share the same 3 pins.
You could use 16 channel i²c i/o expanders instead of shift registers. 4 of those would use only 2 pins, which might be shared with your gyro sensor.
Have you considered multiplexing the LEDs? Might be easier to wire than a pin to control every led individually. 12 Arduino pins and 3 transistors plus a handful of resistors.
One 74595 (8-bit shift register) uses latch, data, clock. 595 can be cascaded.
Using charlieplexing you need only 8 pins for 56 LEDs.
" Charlieplexing Arduino: Control 72 LEDs with just 9 Arduino Pins - The complete guide
LEDs = Xpins * (Xpins-1)...... 8 * (8-1) = 56
Just for grins, could two NAND and an AND gate be used to make it work?

