1 #include <LedControl.h>
3 LedControl lc=LedControl(16,14,15,2); //datain, clk, load, number of chips
5 /* we always wait a bit between updates of the display */
6 unsigned long delaytime=250;
10 The MAX72XX is in power-saving mode on startup,
11 we have to do a wakeup call
14 /* Set the brightness to a medium values */
15 lc.setIntensity(0,15); //0 - 15
16 /* and clear the display */
22 This method will display the characters for the
23 word "Arduino" one after the other on digit 0.
25 void writeArduinoOn7Segment() {
26 lc.setChar(0,0,'a',false);
30 lc.setChar(0,0,'d',false);
34 lc.setRow(0,0,B00010000);
45 This method will scroll all the hexa-decimal
46 numbers and letters on the display. You will need at least
47 four 7-Segment digits. otherwise it won't really look that good.
50 for(int i=0;i<13;i++) {
51 lc.setDigit(0,7,i,false);
52 lc.setDigit(0,6,i+1,false);
53 lc.setDigit(0,5,i+2,false);
54 lc.setDigit(0,4,i+3,false);
55 lc.setDigit(0,3,i+4,false);
56 lc.setDigit(0,2,i+5,false);
57 lc.setDigit(0,1,i+6,false);
58 lc.setDigit(0,0,i+7,false);
66 writeArduinoOn7Segment();