Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. #include <LedControl.h>
  2.  
  3. int DIN = 8;
  4. int CS = 9;
  5. int CLK = 10;
  6.  
  7. LedControl lc=LedControl(DIN,CLK,CS,0);
  8.  
  9. void setup(){
  10. lc.shutdown(0,false); //The MAX72XX is in power-saving mode on startup
  11. lc.setIntensity(0,7); // Set the brightness to maximum value
  12. lc.clearDisplay(0); // and clear the display
  13. }
  14.  
  15. void loop(){
  16.  
  17. byte smile[8]= {0x3C,0x3C,0x3C,0x81,0xA5,0x99,0x42,0x3C};
  18. String rande = "10000001";
  19.  
  20. delay(1000);
  21.  
  22. printByte(smile);
  23. //lc.clearDisplay(0);
  24. }
  25.  
  26.  
  27.  
  28. void printByte(byte character [])
  29. {
  30. int i = 0;
  31. for(i=0;i<8;i++)
  32. {
  33. lc.setRow(0,i,character[i]);
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement