samedi 13 juillet 2013

Cube a leds 4x4

Un petit cube animé 4x4 leds

Dans ce montage, j’utilise un Arduino Nano monté sur un support de circuit intégré 30 broches.

Il s'agit là d'un montage des plus simple qu'on puisse trouver, je n'utilise pas de registre a décalage et pas de générateur de courant constant. J'utilise simplement 16 résistances, inconvénient est que la luminosité des leds baisse légèrement lorsque plusieurs leds sont allumées en même temps (cela ne se voit presque pas vous pourrez en juger sur la vidéo. Si vous souhaitez malgré tout avoir une intensité lumineuse constante, il faudra mettre une résistance par leds soit 64 résistances.

Matériel

1 Carte Arduino NANO ici http://cgi.ebay.fr/Arduino-Nano
64 leds au choix a voir ici  http://stores.ebay.fr/LED-Megashop
16 Résistances 100 ohms valeur a définir selon les leds exemple :
Leds 3.2V/ 20mA   R= (5-3.2)/0.02 soit 90 ohms (valeur standard 91 ohms)

Attention de ne pas prendre des leds de plus de 20mA sinon il faudra piloter celles-ci avec un transistor

Les liens que je met ne sont que des exemples et font parti des sites que j'ai trouvé les moins chers

Le typon


L'implantation

Je pense que vu la simplicité il n'est pas vraiment nécessaire de faire un schéma, le circuit imprimé est tellement simple qu'il est facilement réalisable sur un plaque d'essai a pastilles. Le typon a été dessine de elle manière a ce que chaque colonnes soit soudée directement sur la plaque.
La polarité est:
Colonnes = Anodes (+)
Les lignes = Cathode (-)


Le sketch


/***************** cube a leds  ********************
*****************By Jojo Bricolo********************
************www.mon-arduino.blogspot.fr*************
*************13/07/2013*****************************/


#include <avr/pgmspace.h>

#define CUBESIZE 4
#define PLANESIZE CUBESIZE*CUBESIZE
#define PLANETIME 3333 // vitesse affichage -> 100 Hz
#define TIMECONST 20

// Tableau de programmation de l'affichage
prog_uchar PROGMEM PatternTable[] = {

// la valeur 10 a la fin correspond a la durée d'affichage de chaque ligne soit 10ms

B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0011,B0000,B0000,B0000,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0011,B0010,B0000,B0000,B0011,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0011,B0011,B0000,B0000,B0011,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0011,B0011,B0000,B0000,B0011,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0001,B0011,B0111,B0000,B0001,B0011,B0111,B0000,B0000,B0001,B0011,10,
B0000,B0000,B0000,B0000,B0000,B0011,B0111,B0111,B0000,B0011,B0111,B0111,B0000,B0001,B0011,B0111,10,
B0000,B0000,B0000,B0000,B0000,B0111,B0111,B0111,B0000,B0111,B0111,B0111,B0000,B0011,B0111,B0111,10,
B0000,B0000,B0000,B0000,B0000,B0111,B0111,B0111,B0000,B0111,B0111,B0111,B0000,B0111,B0111,B0111,10,
B0000,B0000,B0000,B0000,B0000,B1110,B1110,B1110,B0000,B1110,B1110,B1110,B0000,B1110,B1110,B1110,10,
B0000,B1110,B1110,B1110,B0000,B1110,B1110,B1110,B0000,B1110,B1110,B1110,B0000,B0000,B0000,B0000,10,
B0000,B1110,B1110,B1110,B0000,B1110,B1110,B1110,B0000,B1100,B1110,B1110,B0000,B0000,B0000,B0000,10,
B0000,B1110,B1110,B1110,B0000,B1100,B1110,B1110,B0000,B1000,B1100,B1110,B0000,B0000,B0000,B0000,10,
B0000,B1100,B1110,B1110,B0000,B1000,B1100,B1110,B0000,B0000,B1000,B1100,B0000,B0000,B0000,B0000,10,
B0000,B1000,B1100,B1110,B0000,B0000,B1000,B1100,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B1000,B1100,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1110,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1110,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0110,B0000,B0000,B0000,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0010,B0000,B0000,B0000,B0011,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0011,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0001,B0001,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0001,B0001,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1110,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1100,B0000,B0000,B1000,B1000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B0000,B0000,B1100,B1000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1110,B1000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0111,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0001,B0011,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0001,B0001,B0000,B0001,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0001,B0000,B0000,B0011,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0111,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1110,B1000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1100,B1100,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B1110,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1111,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0111,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0011,B0000,B0000,10,
B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,10,
B0001,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0011,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0111,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B0111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0111,B0111,B0111,B0111,B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0011,B0011,B0011,B0011,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,10,
B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,10,
B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,10,
B0010,B0001,B0001,B0001,B0010,B0001,B0001,B0001,B0010,B0001,B0001,B0001,B0010,B0001,B0001,B0001,10,
B0100,B0010,B0001,B0001,B0100,B0010,B0001,B0001,B0100,B0010,B0001,B0001,B0100,B0010,B0001,B0001,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0000,B0010,B0100,B0000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0000,B0000,B0000,B0000,B0000,B0010,B0100,B0000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0010,B0100,B0000,B0001,B0010,B0100,B1000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0010,B0100,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B0000,B0010,B0000,B1000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B0000,B0010,B0000,B1000,B0000,B0010,B1000,B0000,10,
B0000,B0000,B0000,B1000,B0000,B0010,B0000,B1000,B0000,B0010,B1000,B0000,B0000,B0000,B1000,B0000,10,
B0000,B0010,B0000,B1000,B0000,B0010,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0010,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0100,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0110,B0110,B0000,B0000,B0100,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1001,B0110,B0110,B1001,B0000,B0110,B0110,B0000,B0000,B0100,B0010,B0000,B0000,B0000,B0000,B0000,10,
B1101,B0111,B1110,B1011,B1001,B0110,B0110,B1001,B0000,B0110,B0110,B0000,B0000,B0100,B0010,B0000,10,
B1111,B1111,B1111,B1111,B1101,B0111,B1110,B1011,B1001,B0110,B0110,B1001,B0000,B0110,B0110,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1101,B0111,B1110,B1011,B1001,B0110,B0110,B1001,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1101,B0111,B1110,B1011,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,

// elements de base, ne pas toucher!!!!
B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, 0
};

//définition des broches de sortie

int ColPin[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; // colonnes anodes
int LignePin[] = {16, 17, 18, 19}; // lignes cathode

void setup()
{
int pin;

for (pin=0; pin<PLANESIZE; pin++) {
pinMode( ColPin[pin], OUTPUT );
}

for (pin=0; pin<CUBESIZE; pin++) {
pinMode( LignePin[pin], OUTPUT );
}
}

void loop()
{
// declare variables
byte PatternBuf[PLANESIZE];
int PatternIdx;
byte AffichageTime;
unsigned long TimeFin;
int Lignes;
int patbufidx;
int ledlig;
int ledcol;
int ledpin;


PatternIdx = 0;

do {

memcpy_P( PatternBuf, PatternTable+PatternIdx, PLANESIZE );
PatternIdx += PLANESIZE;

AffichageTime = pgm_read_byte_near( PatternTable + PatternIdx++ );

TimeFin = millis() + ((unsigned long) AffichageTime) * TIMECONST;


while ( millis() < TimeFin ) {
patbufidx = 0;

for (Lignes=0; Lignes<CUBESIZE; Lignes++) {

if (Lignes==0) {
digitalWrite( LignePin[CUBESIZE-1], HIGH );
} else {
digitalWrite( LignePin[Lignes-1], HIGH );
}


ledpin = 0;
for (ledlig=0; ledlig<CUBESIZE; ledlig++) {
for (ledcol=0; ledcol<CUBESIZE; ledcol++) {
digitalWrite( ColPin[ledpin++], PatternBuf[patbufidx] & (1 << ledcol) );
}
patbufidx++;
}


digitalWrite( LignePin[Lignes], LOW );

delayMicroseconds( PLANETIME );
}
}
} while (AffichageTime > 0);
}



Le tableau de données est configuré de la manière suivante:

B  0    0   0    0
=
B Ligne1, Ligne2, Ligne 3, Ligne4

et

B0000,      B0000,      B0000,       B0000,    .................B0000,
=
colonne1   colonne2   colonne3   colonne4..................colonne16


La réalisation

Le circuit





Montage des leds


1° Préparer un panneau bois ou autre avec les trous du diamètre des leds, ici j'ai utilisé des 3mm mais rien n'empêche de prendre des 5mm.

Les leds doivent être des diffusantes et non des haute luminosité sinon celle-ci risquent d'éclairer les leds éteintes.






2° Pliage des leds




3° Mise en place






4° 1 étage terminé




A faire 4 fois. J'ai également mis un fil de renfort qu'on voit a droite sur la photo.

5° Le montage terminé


Je ne me suis pas foulé pour les leds, c'était du vite fait pour le blog.
Remarquez les fils alimentant les lignes.

6° En vidéo





L' animation sur la vidéo n'est qu'un exemple, a vous de le modifier selon vos gouts.


Nouveau Sketch un peu plus complet

/***************** cube a leds  ********************
*****************By Jojo Bricolo********************
************www.mon-arduino.blogspot.fr*************
*************19/07/2013*****************************/


#include <avr/pgmspace.h>

#define CUBESIZE 4
#define PLANESIZE CUBESIZE*CUBESIZE
#define PLANETIME 100
#define TIMECONST 10


prog_uchar PROGMEM PatternTable[] = {


//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16

B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,5,
B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,10,
B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,5,
B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,5,
B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,10,
B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,5,
B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,5,
B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16    
B0000,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,20,
B0000,B0000,B0000,B0000,B0011,B0000,B0000,B0000,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,20,
B0000,B0000,B0000,B0000,B0011,B0010,B0000,B0000,B0011,B0010,B0000,B0000,B0000,B0000,B0000,B0000,20,
B0000,B0000,B0000,B0000,B0011,B0011,B0000,B0000,B0011,B0011,B0000,B0000,B0000,B0000,B0000,B0000,20,
B0011,B0011,B0000,B0000,B0011,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,20,
B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,20,
B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,20,
B0000,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0011,B0011,B0000,B0000,B0011,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0001,B0011,B0111,B0000,B0001,B0011,B0111,B0000,B0000,B0001,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0011,B0111,B0111,B0000,B0011,B0011,B0111,B0000,B0001,B0011,B0111,B0000,B0000,B0000,B0000,10,
B0000,B0111,B0111,B0111,B0000,B0111,B0111,B0111,B0000,B0011,B0111,B0111,B0000,B0000,B0000,B0000,10,
B0000,B0111,B0111,B0111,B0000,B0111,B0111,B0111,B0000,B0111,B0111,B0111,B0000,B0000,B0000,B0000,20,
B0000,B0000,B0000,B0000,B0000,B0111,B0111,B0111,B0000,B0111,B0111,B0111,B0000,B0111,B0111,B0111,10,
B0000,B0000,B0000,B0000,B0000,B1110,B1110,B1110,B0000,B1110,B1110,B1110,B0000,B1110,B1110,B1110,10,
B0000,B0000,B0000,B0000,B0000,B1110,B1110,B1110,B0000,B1110,B1110,B1110,B0000,B1100,B1110,B1110,10,
B0000,B0000,B0000,B0000,B0000,B1100,B1110,B1110,B0000,B1100,B1100,B1110,B0000,B1000,B1100,B1110,10,
B0000,B0000,B0000,B0000,B0000,B1000,B1100,B1110,B0000,B1000,B1100,B1110,B0000,B0000,B1000,B1100,10,
B0000,B0000,B0000,B0000,B0000,B0000,B1100,B1100,B0000,B0000,B1100,B1100,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1100,B1100,B0000,B0000,B1100,B1100,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B1100,B0000,B0000,B1100,B1100,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B0000,B0000,B1000,B1100,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1100,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1110,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1111,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0111,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0011,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0011,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0001,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0010,B0011,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0010,B0010,B0011,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0110,B0010,B0010,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0110,B0100,B0100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0100,B0100,B1100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B1000,B0000,B0000,B0100,B1100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B1000,B1000,B0000,B0000,B0000,B1100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B1000,B1000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1100,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1100,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1110,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1110,B1110,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1110,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0111,B0111,B0111,B0111,B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0011,B0011,B0011,B0011,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,10,
B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,10,
B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,10,
B1000,B1000,B1000,B1000,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,10,
B0000,B0000,B0000,B0000,B1000,B1000,B1000,B1000,B0100,B0100,B0100,B0010,B0011,B0011,B0011,B0011,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B1000,B1000,B0100,B0111,B0111,B0111,B0111,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B1111,B1111,10,
B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B1111,10,
B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,10,
B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,10,
B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,10,
B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,B0000,B0000,B1111,B0000,10,
B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,B0000,B0000,B1111,B0000,B0000,B1111,B0000,B0000,10,
B0000,B0000,B0000,B1111,B0000,B0000,B1111,B0000,B0000,B1111,B0000,B0000,B1111,B0000,B0000,B0000,10,
B0000,B0000,B1111,B1111,B0000,B1111,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
                                                                                                  
B0111,B0111,B0111,B0111,B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0011,B0011,B0011,B0011,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,10,
B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,10,
B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,10,
B1000,B1000,B1000,B1000,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,10,
B0000,B0000,B0000,B0000,B1000,B1000,B1000,B1000,B0100,B0100,B0100,B0010,B0011,B0011,B0011,B0011,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1000,B1000,B1000,B0100,B0111,B0111,B0111,B0111,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B1111,B1111,10,
B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B1111,10,
B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,10,
B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,10,
B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,B0000,B0000,B0000,B1111,10,
B0000,B0000,B0001,B1110,B0000,B0000,B0001,B1110,B0000,B0000,B0001,B1110,B0000,B0000,B0001,B1110,10,
B0000,B0001,B0010,B1100,B0000,B0001,B0010,B1100,B0000,B0001,B0010,B1100,B0000,B0001,B0010,B1100,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,10,
B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B0100,B0010,B0010,10,
B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,B1000,B0100,B0010,B0001,10,
B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,B0000,B1100,B0011,B0000,10,
B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,B0000,B0011,B1100,B0000,10,
B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,B0001,B0010,B0100,B1000,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B0001,B0001,B0010,B0100,B0001,B0001,B0010,B0100,B0001,B0001,B0010,B0100,B0001,B0001,B0010,B0100,10,
B0001,B0001,B0001,B0010,B0001,B0001,B0001,B0010,B0001,B0001,B0001,B0010,B0001,B0001,B0001,B0010,10,
B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,10,
B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,10,
B1000,B1000,B1000,B1000,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0001,B0001,B0001,B0001,10,
B0000,B0000,B0000,B0000,B1100,B1100,B1100,B1100,B0011,B0011,B0011,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0011,B0011,B0011,B0011,B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,10,
B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,10,
B0000,B0000,B0000,B0000,B1100,B1100,B1100,B1100,B0011,B0011,B0011,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0011,B0011,B0011,B0011,B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,10,
B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,10,
B0000,B0000,B0000,B0000,B1100,B1100,B1100,B1100,B0011,B0011,B0011,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0011,B0011,B0011,B0011,B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,10,
B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,10,
B0000,B0000,B0000,B0000,B1100,B1100,B1100,B1100,B0011,B0011,B0011,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0011,B0011,B0011,B0011,B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,10,
B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,10,
B0000,B0000,B0000,B0000,B1100,B1100,B1100,B1100,B0011,B0011,B0011,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0011,B0011,B0011,B0011,B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,10,
B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,10,
B0000,B0000,B0000,B0000,B1100,B1100,B1100,B1100,B0011,B0011,B0011,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0011,B0011,B0011,B0011,B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,10,
B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,10,
B0000,B0000,B0000,B0000,B1100,B1100,B1100,B1100,B0011,B0011,B0011,B0011,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0011,B0011,B0011,B0011,B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B1000,B1000,B1000,B1000,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,10,
B0001,B0001,B0001,B0001,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,10,
B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,B0001,10,
B0010,B0001,B0001,B0001,B0010,B0010,B0001,B0001,B0001,B0001,B0010,B0010,B0001,B0001,B0001,B0010,10,
B0100,B0010,B0001,B0001,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0010,B0001,B0001,B0010,B0100,10,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,10,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,10,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,10,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,10,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,10,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,10,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,10,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,10,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,10,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,10,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,10,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,10,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,10,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,10,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,10,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,10,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,10,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,10,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,10,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,10,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,10,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,10,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,10,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,10,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,10,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,10,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,10,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,10,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,10,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,10,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,10,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,10,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,10,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,10,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,10,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,10,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,5,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,5,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,5,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,5,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,5,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,5,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,5,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,5,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,5,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,5,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,5,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,5,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,5,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,5,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,5,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,5,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,5,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,5,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,5,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,5,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,5,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,5,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,5,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,5,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,5,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,5,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,5,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,5,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,5,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,5,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,10,
B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,10,
B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,10,
B0001,B0010,B0100,B1000,B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,10,
B0000,B0011,B1100,B0000,B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,10,
B0000,B1100,B0011,B0000,B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,10,
B1000,B0100,B0010,B0001,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0001,B0010,B0100,B1000,10,
B1000,B0100,B0010,B0010,B0100,B0100,B0010,B0010,B0010,B0010,B0100,B0100,B0010,B0010,B0100,B1000,10,
B1000,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B0100,B1000,10,
B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,10,
B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,10,
B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B0000,B1000,B1000,B1000,10,
B1000,B1000,B1000,B1000,B1000,B1000,B1000,B1000,B0000,B1000,B1000,B1000,B0000,B0000,B1000,B1000,10,
B1000,B1000,B1000,B1000,B0000,B1000,B1000,B1000,B0000,B0000,B1000,B1000,B0000,B0000,B0000,B1000,10,
B0000,B1000,B1000,B1000,B0000,B0000,B1000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B1000,B1000,B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B0000,B0000,B0000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1000,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1000,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1000,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1100,B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1100,B1100,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1100,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1100,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1100,B1110,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1110,B1110,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1110,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1110,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0000,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0001,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0001,B0001,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0011,B0001,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B0111,B0001,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B0001,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1001,B0001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B1111,B1111,B1111,B1111,B1111,B1001,B1001,B0001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1001,B1001,B1001,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1001,B1001,B1101,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1001,B1101,B1101,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1101,B1101,B1101,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1101,B1101,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1101,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0010,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0000,B0010,B0010,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0010,B0010,B0010,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0010,B0010,B0010,B0010,B0000,B0000,B0000,B0000,10,
//1   //2   //3   //4   //5   //6   //7   //8   //9   //10  //11  //12  //13  //14  //15  //16
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0110,B0010,B0010,B0010,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0110,B0110,B0010,B0010,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0110,B0110,B0110,B0010,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0110,B0110,B0110,B0110,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0111,B0110,B0110,B1110,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0111,B0111,B1110,B1110,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0111,B1111,B1111,B1110,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0000,B0000,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1000,B0000,B0000,B0001,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1100,B0000,B0000,B0011,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1110,B0000,B0000,B0111,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0000,B1111,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0001,B1000,B1111,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1001,B1001,B1111,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1101,B1011,B1111,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,1000,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0110,B0110,B0000,10,
B1111,B1111,B1111,B1111,B1111,B1111,B1111,B1111,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,10,
B1111,B1111,B1111,B1111,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,10,
B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,10,
B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0110,B0110,B0000,B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0110,B0110,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,10,
B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,4000,
// elements de base, ne pas toucher!!!!
B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, B0000, 0
};

//définition des broches de sortie

int ColPin[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; // colonnes anodes
int LignePin[] = {16, 17, 18, 19}; // lignes cathode

void setup()
{
int pin;

for (pin=0; pin<PLANESIZE; pin++) {
pinMode( ColPin[pin], OUTPUT );
}

for (pin=0; pin<CUBESIZE; pin++) {
pinMode( LignePin[pin], OUTPUT );
}
}

void loop()
{
// declare variables
byte PatternBuf[PLANESIZE];
int PatternIdx;
byte AffichageTime;
unsigned long TimeFin;
int Lignes;
int patbufidx;
int ledlig;
int ledcol;
int ledpin;


PatternIdx = 0;

do {

memcpy_P( PatternBuf, PatternTable+PatternIdx, PLANESIZE );
PatternIdx += PLANESIZE;

AffichageTime = pgm_read_byte_near( PatternTable + PatternIdx++ );

TimeFin = millis() + ((unsigned long) AffichageTime) * TIMECONST;


while ( millis() < TimeFin ) {
patbufidx = 0;

for (Lignes=0; Lignes<CUBESIZE; Lignes++) {

if (Lignes==0) {
digitalWrite( LignePin[CUBESIZE-1], HIGH );
} else {
digitalWrite( LignePin[Lignes-1], HIGH );
}


ledpin = 0;
for (ledlig=0; ledlig<CUBESIZE; ledlig++) {
for (ledcol=0; ledcol<CUBESIZE; ledcol++) {
digitalWrite( ColPin[ledpin++], PatternBuf[patbufidx] & (1 << ledcol) );
}
patbufidx++;
}


digitalWrite( LignePin[Lignes], LOW );

delayMicroseconds( PLANETIME );
}
}
} while (AffichageTime > 0);
}

Si cela vous intéresse, je suis en mesure de vous faire un kit ou même vous réaliser ce montage ( concernant les leds, je ne fais que les fournir, a vous de les souder) !!!
N'hésitez pas a me contacter.

2 commentaires:

  1. Réponses
    1. Bonjour,

      Je pense que la première chose dans un message est la politesse. Un blog c'est du travail qu'on partage pour éventuellement faciliter ou aider le gens. Je pense qu'un minimum est de remercier la personne qui passe du temps pour rendre service!!!!

      Ensuite si vous regardez bien le code est juste au dessus (il y en a même deux), il suffit de le sélectionner, de le copier et de le coller dans l'IDE ARDUINO.

      Cordialement
      Jojo

      Supprimer