top of page
georgie h

Scrolling LED Matrix - Progress



Following my post "Scrolling LED Matrix - Research Notes (georgiehodges.com)" I have received my LED Matrix and wires to connect it to the Arduino UNO. When initially testing it I found that the LED Matrix lit up completely, then only one of the squares lit up, then no squares lit up. At first I thought this was due to the LED Matrix itself but found out eventually that this was in fact that there was not enough power going to the matrix.


Further testing today has allowed me to get a working LED Matrix using the code on MAX7219 LED Matrix Display Arduino Tutorial (4 Examples) (makerguides.com).


/* Example code for scrolling text effect on MAX7219 LED dot matrix display with Arduino. More info: https://www.makerguides.com */

// Include the required Arduino libraries:
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

// Define hardware type, size, and output pins:
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 4
#define CS_PIN 3

// Create a new instance of the MD_Parola class with hardware SPI connection:
MD_Parola myDisplay = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);

// Setup for software SPI:
// #define DATAPIN 2
// #define CLK_PIN 4
// MD_Parola myDisplay = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

void setup() {
  // Intialize the object:
  myDisplay.begin();
  // Set the intensity (brightness) of the display (0-15):
  myDisplay.setIntensity(0);
  // Clear the display:
  myDisplay.displayClear();
  myDisplay.displayText("Scrolling text", PA_CENTER, 100, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
}

void loop() {
  if (myDisplay.displayAnimate()) {
    myDisplay.displayReset();
  }
}

Going forward I will be using the example code above as a starting point for my project code.


Coding updates to follow.

45 views0 comments

Recent Posts

See All

Comments


bottom of page