#include <LedControl.h>
LedControl lc=LedControl(12,11,10,1);
int i, delaytime=500;
byte happy[8]=
{
B00111100,
B01000010,
B10100101,
B10000001,
B10000001,
B10100101,
B01011010,
B00111100
};
byte sad[8]=
{
B00111100,
B01000010,
B10100101,
B10000001,
B10011001,
B10100101,
B01000010,
B00111100
};
void setup()
{
//The MAX72XX is in power-saving mode on startup,
lc.shutdown(0,false); // wakeup The MAX7219
lc.setIntensity(0,8); // Set brightness to a medium value
lc.clearDisplay(0); // Clear the display
}
void loop()
{
for(i=0; i<8; i++)
lc.setRow(0,i,happy[i]);
delay(delaytime);
for(i=0; i<8; i++)
lc.setRow(0,i,sad[i]);
delay(delaytime);
}