Go Down

Topic: 4x4x4 LED Cube (Read 4342 times) previous topic - next topic


Hi all,

New to this Arduino stuff so if this has been done before my apologies.

I saw a video on YouTube of an 8x8x8 LED cube and was amazed by it, after doing some digging I discovered the Arduino controller and thought I can have a go at that. So after more research I decided to have a go at a 4x4x4 cube and here it is!

The build itself (although very fiddly) went quite smoothly, however the programming to display the leds on the cube properly was a bit more challenging than I'd anticipated since the LEDS have to be lit one row at a time and then turned off before lighting the next row (much like the scanning of a TV). Once I had that cracked I wrote a display function that would allow me to "plot" LEDS using an x, y, z co-ordinate system and this makes writing effects very easy as I can just treat the cube as a small 3d matrix if you like.

I've got six effects written (more to follow) and there's a video below showing them all, I've also included the code for the Arduino (needs some tidying up in places) for you to have a look at, and if it helps anybody with anything then please feel free to use it as you see fit.

Again apologies if this has been done to death before (looking on the web I suspect it might) but I just thought I'd share my first project with Arduino and please feel free to comment, any feedback is welcome.

A link to the video (it is late at the minute but I cant seem to find how to embed the video!!!)


Nice work, you have my like  :)


I ported youe sinwave code to my RGB 4x4x4 cube that runs on a Nano and the speed was very slow compared to yours. The code is virtually the same, except the part where it turns on the LEDs. Is there anyway to hasten the speed e.g. using int vars instead of doubles? I'm pretty new to Arduino programming, so any help would be appreciated. TIA.


Without seeing your drawing code the only thing I can suggest to increase the speed of the sin effect is to increase the value that angle is incremented by, currently its at 0.04 try upping that. It should be quite sensitive so a value of 0.1 might be a good starting point. Also my refreshtime value has an impact on how fast the effect updates, essentially this timer controls how long each frame of the animation stays lit. Since your update code will behave differently this could also have an impact on the speed of the updates. Anyway try changing the value of the angle increment and see how you get on.

Sorry for the delay in coming back to you on this I've been busy with work the last few days so not had much time to check back...


i downloaded the code but for some reason not all columns are operating. Im completely new to arduino so im having a hard time. I really only want the rain animation. Im using the mega2560 with out the use of transistors. Can you give me some pointers on how your cube was setup? Thanks for any help

Go Up