matriz LED automática

Arduino automatic LED matrix

Welcome to a new Arduino project. In this tutorial, you will learn how to build an automatic LED matrix with Arduino and program it to run different animations. We will also cover the materials used, the wiring diagram, and the code needed to program the matrix.

Materials used in the project

Below you can find the materials used to build our automatic LED matrix with Arduino together with a brief description of each one. If you want to build it yourself, you can click the images to go to a website where you can buy the materials.

Arduino Uno board: it is the brain of the project and controls every part of it through the code you will find below.

LED matrix: as the name suggests, it is a matrix that we can light up however we want by using the small controller it has built in.

A board with interconnected holes (pins) that we use to make all the project connections.

Jumper wires: these wires have male or female pin connectors that let us connect the different elements mentioned above.

Components needed for the project

Arduino starter kit
Arduino starter kit
Arduino Uno board
Arduino Uno board
Male-to-female jumper wires
Male-to-female jumper wires
Breadboard
Breadboard
Matriz LED 8x8
8x8 LED matrix

WE DEVELOP YOUR IDEA

Need help with a project?

RobotUNO project consulting
  • Prototyping and MVPs
  • Arduino and ESP32
  • PCB design
  • 3D part design
  • Bluetooth connectivity
  • Feasibility study
  • Cost optimization
  • Technical consulting
  • Internet of Things
  • Patent supbyt
Learn more

Step-by-step project video

If you want a much more detailed walkthrough of how to build this project from start to finish, including a code explanation, the video below covers everything in a more visual and easier-to-follow way. And remember, if you enjoy this kind of content, do not forget to subscribe.

Arduino wiring diagram for the automatic LED matrix

One of the most important parts of assembling the LED matrix is connecting the different elements correctly. To avoid assembly mistakes or incorrect connections, here is the wiring diagram used in this project. With this wiring, you can use the code at the end of the post without making any modifications.

matriz DEL automática

Arduino code for the automatic LED matrix

Below you can find the code developed specifically for this project. The pins used in the code are the same ones shown in the wiring diagram above.

If you want a more detailed explanation of the different parts of the code used to program the LED matrix and how it works, I recommend watching the video linked above.

If you have questions about how to use or install the Arduino development environment, here is a link to how to download the Arduino IDE

//Canal de YouTube -> Robot UNO
//Matriz LED automática con Arduino

#include "LedControl.h"

LedControl lc=LedControl(12,10,11,1);

void setup() {
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}

void loop() { 
  int filas, col;
  for(filas=0;filas<8;filas++) {
    for(col=0;col<8;col++) {
      lc.setLed(0,filas,col,true);
      delay(100);
      }
   } 
   for(col=0;col<8;col++){
    for(filas=0;filas<8;filas++){
      lc.setLed(0,filas,col,false);
      delay(100);
    }
  }
  for(filas=0;filas<8;filas++) {
    for(col=0;col<8;col=col+2) {
      lc.setLed(0,filas,col,true);
      delay(100);
      }
   }
   for(col=0;col<8;col++){
    for(filas=0;filas<8;filas=filas+2){
      lc.setLed(0,filas,col,false);
      delay(100);
    }
  }
}
Published in Arduino projects, LED projects, electronics projects.