//We always have to include the library #include "LedControl.h" //include this file so we can write down a byte in binary encoding #include /* Now we need a LedControl to work with. pin 12 is connected to the DataIn pin 11 is connected to the CLK pin 10 is connected to LOAD We have only a single MAX72XX. */ LedControl lc=LedControl(12,11,10,1); /* we always wait a bit between updates of the display */ unsigned long delaytime=100; void setup() { /* The MAX72XX is in power-saving mode on startup, we have to do a wakeup call */ lc.shutdown(0,false); /* Set the brightness to a medium values */ lc.setIntensity(0,5); /* and clear the display */ lc.clearDisplay(0); } void loop() { lc.setRow(0,0,B10101010); delay(2000); lc.clearDisplay(0); lc.setColumn(0,0,B10101010); delay(2000); lc.clearDisplay(0); byte a[5]={B01111110,B10001000,B10001000,B10001000,B01111110}; byte r[5]={B00111110,B00010000,B00100000,B00100000,B00010000}; byte d[5]={B00011100,B00100010,B00100010,B00010010,B11111110}; byte u[5]={B00111100,B00000010,B00000010,B00000100,B00111110}; byte i[5]={B00000000,B00100010,B10111110,B00000010,B00000000}; byte n[5]={B00111110,B00010000,B00100000,B00100000,B00011110}; byte o[5]={B00011100,B00100010,B00100010,B00100010,B00011100}; lc.setRow(0,0,a[4]); lc.setRow(0,1,a[3]); lc.setRow(0,2,a[2]); lc.setRow(0,3,a[1]); lc.setRow(0,4,a[0]); delay(1000); lc.setRow(0,0,r[4]); lc.setRow(0,1,r[3]); lc.setRow(0,2,r[2]); lc.setRow(0,3,r[1]); lc.setRow(0,4,r[0]); delay(1000); lc.setRow(0,0,d[4]); lc.setRow(0,1,d[3]); lc.setRow(0,2,d[2]); lc.setRow(0,3,d[1]); lc.setRow(0,4,d[0]); delay(1000); lc.setRow(0,0,u[4]); lc.setRow(0,1,u[3]); lc.setRow(0,2,u[2]); lc.setRow(0,3,u[1]); lc.setRow(0,4,u[0]); delay(1000); lc.setRow(0,0,i[4]); lc.setRow(0,1,i[3]); lc.setRow(0,2,i[2]); lc.setRow(0,3,i[1]); lc.setRow(0,4,i[0]); delay(1000); lc.setRow(0,0,n[4]); lc.setRow(0,1,n[3]); lc.setRow(0,2,n[2]); lc.setRow(0,3,n[1]); lc.setRow(0,4,n[0]); delay(1000); lc.setRow(0,0,o[4]); lc.setRow(0,1,o[3]); lc.setRow(0,2,o[2]); lc.setRow(0,3,o[1]); lc.setRow(0,4,o[0]); delay(1000); lc.clearDisplay(0); }