Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LedControl.h>
- int DIN = 8;
- int CS = 9;
- int CLK = 10;
- LedControl lc=LedControl(DIN,CLK,CS,0);
- void setup(){
- lc.shutdown(0,false); //The MAX72XX is in power-saving mode on startup
- lc.setIntensity(0,7); // Set the brightness to maximum value
- lc.clearDisplay(0); // and clear the display
- }
- void loop(){
- byte smile[8]= {0x3C,0x3C,0x3C,0x81,0xA5,0x99,0x42,0x3C};
- String rande = "10000001";
- delay(1000);
- printByte(smile);
- //lc.clearDisplay(0);
- }
- void printByte(byte character [])
- {
- int i = 0;
- for(i=0;i<8;i++)
- {
- lc.setRow(0,i,character[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement