Author Options:

codigo para cubo de leds de 5x5x5 con arduino? Answered

me gustaria me ayudaran con un codigo para un cubo de leds de 5x5x5 con arduino uno, lo hice mediante multiplex, ayuda por favor 



LED cube software is not standardized so you will need to tailor the code people have posted here to your particular project.

In my 5x5x5 cube I used two PORTs so that I could quickly set the 'column' of LEDs (one of 25 columns) by writing a value to one of the ports and then light the 5 LEDs in that column at once by writting a value (0-31) to the other port.  This is much faster than trying to perform individual pin digital writes.  Your cube may be different so you will have to adjust the code to match.

In my cube I created a matrix to hold the desired states of the LEDs.  I used an interrupt  routine based on a timer to light the LEDs based on the matrix values.  The interrupt timer routine ensures the LEDs appear uniform in brightness.

In the loop of the program I do the actual changing of the matrix using routines like set_led(x,y,z) and clear_led(x,y,z).  Here is where you design your patterns.  One pattern that looks nice with my blue LEDs is a rain drop pattern, I randomly pick a column and light up the LEDs so that they look like rain drops falling.  Other common ones are like moving walls or spinning walls.  Take a look at the many LED cube code posts in other instructables for ideas.

Best Wishes.

This is an English speaking forum please post in English.

Acording to google translate:

code for 5x5x5 cube with arduino LEDs?
I would like to help me with a code for a cube of 5x5x5 LEDs with an Arduino, I did multiplex, please help.