Skip to content

A basic example of animating using an 8 x 8 LED matrix.

Notifications You must be signed in to change notification settings

codeadamca/arduino-led-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Arduino and an LED Matrix

A basic example of controlling an 8 x 8 LED matrix using an Arduino.

Arduino Code

Open up Arduino Create and add the following code:

#include <MaxMatrix.h>

int DIN = 7;
int CLK = 6;
int CS = 5;
int maxInUse = 1;

MaxMatrix m(DIN, CS, CLK, maxInUse);

char smile01[] = {8, 8,
  B00111100,
  B01000010,
  B10010101,
  B10100001,
  B10100001,
  B10010101,
  B01000010,
  B00111100
};
char smile02[] = {8, 8,
  B00111100,
  B01000010,
  B10010101,
  B10010001,
  B10010001,
  B10010101,
  B01000010,
  B00111100
};
char smile03[] = {8, 8,
  B00111100,
  B01000010,
  B10100101,
  B10010001,
  B10010001,
  B10100101,
  B01000010,
  B00111100
};

void setup() {

  m.init();
  m.setIntensity(1);

}

void loop() {

  m.writeSprite(0, 0, smile01);
  delay( 500 );
  m.writeSprite(0, 0, smile02);
  delay( 500 );
  m.writeSprite(0, 0, smile03);
  delay( 500 );

}

View the Arduino code on Arduino Create

You will need to setup the following circuit using your Arduino:

Tinkercad Circuit

View the Circuit on Tinkercad

Full tutorial URL:
https://codeadam.ca/learning/arduino-led-matrix.html


Repo Resources

About

A basic example of animating using an 8 x 8 LED matrix.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages