RoboCircuits
Published © CC BY

8x8 Dot Matrix

Make a cheap and good looking LED matrix.

ExpertFull instructions provided2 hours12,266
8x8 Dot Matrix

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
LED (generic)
LED (generic)
×1
Custom fabricated PCB
OSH Park Custom fabricated PCB
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Custom parts and enclosures

schemastics

Schematics

schematics

Code

Code

C/C++
//RoboCircuits
//Youtbe  www.youtube.com/robocircuits
//Website http://robocircuits.com
//Please Subscribe us and share this tutorial


byte H[] = {
B00000000,
B10001001,
B10001001,
B11111001,
B10001001,
B10001001,
B00000000,
B00000000};

byte R[] = {
B11111100,
B10000010,
B10000001,
B10000010,
B11111100,
B10010000,
B10001000,
B10000010};

byte S[] = {
B01111111,
B10000000,
B10000000,
B10000000,
B00000000,
B10000000,
B10000000,
B01111111};

byte R[] = {
B11111100,
B10000010,
B10000001,
B10000010,
B11111100,
B10000100,
B10000010,
B10000001};

byte C[] = {
B00111111,
B01000000,
B10000000,
B10000000,
B10000000,
B10000000,
B01000000,
B00111111};

byte random1[] = {
B01010101,
B10101010,
B01010101,
B10101010,
B01010101,
B10101010,
B01010101,
B10101010};

byte random2[] = {
B10101010,
B01010101,
B10101010,
B01010101,
B10101010,
B01010101,
B10101010,
B01010101};


const int columnPins[] = { 12, 11, 10, 9, 8, 7, 6, 5};
const int rowPins[] = { 4, 3, 2, 0, 1, 13, 14, 15};
void setup() {
for (int i = 0; i < 8; i++)
{
pinMode(rowPins[i], OUTPUT); // make all the LED pins outputs
pinMode(columnPins[i], OUTPUT);
digitalWrite(columnPins[i], HIGH); // disconnect column pins from Ground
}
}

void loop()
{
int Delay = 800 ; 

randomeffect();
show(H, 1000); 

randomeffect();
show(R, 1000);

randomeffect();
show(C, 1000);
randomeffect();
show(H, 1000); 

randomeffect();
show(R, 1000);

randomeffect();
show(C, 1000);
randomeffect();
show(H, 1000); 

randomeffect();
show(R, 1000);

randomeffect();
show(C, 1000);

delay(Delay); 
}


void randomeffect()
{
  for(int a=0;a<2;a++)
{
show(random1,30);
delay(40);
show(random2,30);
delay(40);
}
}



void show( byte * image, unsigned long duration)
{
unsigned long start = millis(); 
while (start + duration > millis()) 
{
for(int row = 0; row < 8; row++)
{
digitalWrite(rowPins[row], HIGH); // connect row to +5 volts
for(int column = 0; column < 8; column++)
{
boolean pixel = bitRead(image[row],column);
if(pixel == 1)
{
digitalWrite(columnPins[column], LOW); // connect column to Gnd
}
delayMicroseconds(300); // a small delay for each LED
digitalWrite(columnPins[column], HIGH); // disconnect column from Gnd
}
digitalWrite(rowPins[row], LOW); // disconnect LEDs
}
}
}

Credits

RoboCircuits

RoboCircuits

37 projects • 217 followers
YouTuber, Explorer, Creator, Programmer, Arduino Lover and Engineer

Comments