Welcome, Guest
Username: Password: Remember me

TOPIC: Arduino Codes to Test the 8x8 Led Matrix.

Arduino Codes to Test the 8x8 Led Matrix. 2 years 5 months ago #1848

  • Ray
  • Ray's Avatar
  • Moderator
  • Posts: 702
  • Thank you received: 152
  • Karma: 44
The software:

The codes used by the Arduino Audio Meter need the LedControl library to represent graphics in the display:
  • There are good tutorials online: playground.arduino.cc/Main/LedControl/
  • You can install this library using Tools/Library Management and search for LedControl (but don't install it just yet, keep on reading)

There are some other libraries online (MD_MAX72XX, LEDMatrixDriver, etc) but we found that Ledcontrol is the easiest to work with.

Going one step beyond, we use a faster version of the LedControl library (forum.arduino.cc/index.php?topic=350313.0). If we want to represent real-time audio signals, it's better to use this faster version of Ledcontrol.

Every code in the forum is in a .zip file, this zip contains 3 files: code.c, LedControl.h and LedControl.cpp. These LedControl files are the 10x faster version, so you just need to unzip the file and compile code.c that will use the Ledcontrol files next to it in the same folder. In this way, you won't need to install the LedControl libraries, as the code will use the one included in the same folder.

The Hardware:
The pedal uses the 1588BS 8x8 led matrix. It is "common anode", the internal diagram looks like this:

And it is 38mm square:

You cannot use a "common cathode" 8x8 led matrix in this project. If you do so the graphics will be just weird. There is no way to use this kind of matrices unless you write your own library that is not easy.

The Codes:
We have 2 codes. You just need to unzip, compile and load. You can have a look at the code and see how simple they are:
  1. Test_One_8x8LED.ino This first code is designed to test only one 8x8LED matrix (it shows a moving colum):

    File Attachment:

    File Name: Test_One_8x8LED.zip
    File Size: 6 KB

  2. Test_All_8x8LEDs.ino: This second code will test the four 8x8LED matrices (it shows a moving colum):

    File Attachment:

    File Name: Test_All_8x8LEDs.zip
    File Size: 6 KB

This is the code of Test_One_8x8LED.ino :
#include "LedControl.h"
int j;
LedControl lc = LedControl(12, 11, 10, 1);
//where 12=data, 11=clock, 10=cs and 1=number of 8x8 Matrices.
void setup() {
//initialice the LED matrix:
        lc.shutdown(0, false);  // turns on display
        lc.setIntensity(0, 8); // 15 = brightest
void loop() {
        // This will show a moving column just to test the devices
        for(j = 0; j < 8; j++)
            lc.setColumn(0, j, 0xFF);//LED matrix 1 set colum to all ON (FF)
            lc.setColumn(0, j, 0);//LED matrix 1 turn OFF column
Last Edit: 2 years 5 months ago by Ray.
The administrator has disabled public write access.
Time to create page: 0.141 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio