Vincent Kok
Published © CC BY-NC-SA

How To - Control 8X8 LED Dot Matrix with SMDuino (Arduino...

Last month, I got a new Arduino development board from Smart-Prototyping – SMDuino. Well, why is it called SMDuino? This is because...

BeginnerFull instructions provided12 minutes2,302
How To - Control 8X8 LED Dot Matrix with SMDuino (Arduino...

Things used in this project

Hardware components

SMDuino
×1
8x8 LED Dot Matrix
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
LED Control Library

Story

Read more

Code

LEDMatrix.ino

Arduino
Download and open it in Arduino IDE
#include <LedControl.h>

int DIN = 12;
int CS =  11;
int CLK = 10;

byte e[8]=     {0x1F,0x10,0x10,0x1F,0x10,0x10,0x1F,0x00};
byte l[8]=     {0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0x00};
byte t[8] = {0x1F,0x04,0x04,0x04,0x04,0x04,0x04,0x00};
byte r[8]={0x1F,0x11,0x11,0x1F,0x14,0x12,0x11,0x00};
byte o[8]=     {0x1F,0x11,0x11,0x11,0x11,0x11,0x1F,0x00};
byte n[8] = {0x11,0x19,0x1D,0x15,0x13,0x13,0x11,0x00};
byte i[8] = {0x1F,0x04,0x04,0x04,0x04,0x04,0x1F,0x00};
byte c[8]=     {0x1F,0x10,0x10,0x10,0x10,0x10,0x1F,0x00};
byte s[8]=     {0x0F,0x10,0x10,0x0E,0x01,0x01,0x1E,0x00};
byte d[8]=     {0x78,0x7C,0x66,0x66,0x66,0x66,0x7C,0x78};
byte u[8]=     {0x66,0x66,0x66,0x66,0x66,0x66,0x7E,0x7E};
byte eight[8]= {0x7E,0x7E,0x66,0x7E,0x7E,0x66,0x7E,0x7E};
byte dot[8]=   {0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18};
byte m[8]=     {0xE7,0xFF,0xFF,0xDB,0xDB,0xDB,0xC3,0xC3};
byte smart[8]= {0x08,0x04,0x02,0x11,0x02,0x04,0x08,0x00};
byte v[8]= {0xC3,0xC3,0xC3,0x66,0x66,0x66,0x3C,0x18};
byte v2[8] ={0x11,0x11,0x11,0x11,0x11,0x0A,0x04,0x00};
byte smile[8]=   {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C};
byte neutral[8]= {0x3C,0x42,0xA5,0x81,0xBD,0x81,0x42,0x3C};
byte frown[8]=   {0x3C,0x42,0xA5,0x81,0x99,0xA5,0x42,0x3C};
byte k[8]={0x11,0x12,0x14,0x18,0x14,0x12,0x11,0x00};
byte all[8]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
byte none[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

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,15);      // Set the brightness to maximum value
 lc.clearDisplay(0);         // and clear the display
}

void loop(){ 
 
    printByte(smart);
     
    delay(1000);

    printByte(v2);
    
    delay(1000);

    printByte(k);    

    delay(1000);
    printByte(e);    

    delay(1000);
    printByte(l);    

    delay(1000);
    printByte(e);    

    delay(1000);
    printByte(c);    

    delay(1000);
    printByte(t);    

    delay(1000);
    printByte(r);    

    delay(1000);
    printByte(o);    

    delay(1000);
    printByte(n);    

    delay(1000);
    printByte(i);    

    delay(1000);
    printByte(c);    

    delay(1000);
    printByte(s);    

    delay(1000);
   printByte(all);    

    delay(100);
    printByte(none);    

    delay(100);
     printByte(all);    

    delay(100);
    printByte(none);    

    delay(100);
}

void printEduc8s()
{
  printByte(e);
  delay(1000);
  printByte(d);
  delay(1000);
  printByte(u);
  delay(1000);
  printByte(c);
  delay(1000);
  printByte(eight);
  delay(1000);
  printByte(s);
  delay(1000);
  printByte(dot);
  delay(1000);
  printByte(c);
  delay(1000);
  printByte(o);
  delay(1000);
  printByte(m);
  delay(1000);
}

void printByte(byte character [])
{
  int i = 0;
  for(i=0;i<8;i++)
  {
    lc.setRow(0,i,character[i]);
  }
}

Github

https://github.com/wayoda/LedControl

Credits

Vincent Kok

Vincent Kok

6 projects • 35 followers
Community Evangelist, Maker, a STEM AI Robotics advocate in the EdTech industry.

Comments