Table of Contents
In this project you will see how to Interface 8×8 led matrix with Arduino or 8×8 dot led matrix with Arduino. In this section we will connect Arduino and led matrix display and send data wirelessly using Bluetooth HC05.
REQUIRED MATERIAL
S.N. | COMPONENT | QUANTITY |
---|---|---|
1. | Arduino Uno | 1 |
2. | 8x8 LED matrix module of 4 | 1 |
3. | Bluetooth HC05 | 1 |
4. | Jumper wires | 10 (approx) |
MAX7219 DOT LED MATRIX 4 in 1 MODULE
CIRCUIT DIAGRAM
CONNECTION TABLE
ARDUINO | BLUETOOTH HC05 |
+5 V | VCC (+5 V) |
GND | GND |
0 (RX) | TX |
1 (TX) | RX |
ARDUINO | 8X8 LED MATRIX |
+5 V | VCC (+5 V) |
GND | GND |
11 | DIN |
10 | CS |
13 | CLK |
WORKING
After uploading arduino code to board, connect the components as shown in the circuit diagram above then you need to pair your Android phone with Bluetooth HC05 (how to pair) using an Android App (download app).
Once you get paired, then write any message in text box and click over Send button to send data wirelessly, which will appear on LED matrix display board.
As you sent data from your phone it will received by bluetooth HC05 and it transfer data bytes to Arduino Serial pins, where arduino is instructed to read Serial data and display it on 8×8 LED LED Matrix board.
ARDUINO PROGRAMMING CODE
To get run the following code you need to include these Arduino Libraries if not already included. MD_Parola-3.1.1 (at S.N. 8) and MD_MAX72xx-master (at S.N. 9).
I have FC16 hardware type, you may have other hardware type such as
-
- PAROLA_HW,
- GENERIC_HW,
- ICSTATION_HW or
- FC16_HW.
Change your hardware type if data in led matrix is not appears properly.
#include <MD_Parola.h> #include <MD_MAX72xx.h> #include <SPI.h> #define HARDWARE_TYPE MD_MAX72XX::FC16_HW #define MAX_DEVICES 4 // for NODE MCU //#define CLK_PIN D5 //#define DATA_PIN D7 //#define CS_PIN D8 // for ARDUINO #define CLK_PIN 13 #define DATA_PIN 11 #define CS_PIN 10 MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES); uint8_t scrollSpeed = 35; textEffect_t scrollEffect = PA_SCROLL_LEFT; textPosition_t scrollAlign = PA_LEFT; uint16_t scrollPause = 100; #define BUF_SIZE 75 char curMessage[BUF_SIZE] = { "" }; char newMessage[BUF_SIZE] = { "PIJA EDUCATION" }; bool newMessageAvailable = true; void setup() { Serial.begin(9600); P.begin(); P.displayText(curMessage, scrollAlign, scrollSpeed, scrollPause, scrollEffect, scrollEffect); } void loop() { if (P.displayAnimate()) { if (newMessageAvailable) { strcpy(curMessage, newMessage); newMessageAvailable = false; } P.displayReset(); } if (Serial.available()>0) { String st = Serial.readString(); Serial.println(st); st.toCharArray(newMessage, BUF_SIZE); newMessageAvailable = true; } }
OUTPUT
Pair android phone with Bluetooth HC05 using Android App. Then write data in text box and click send and your message will get display on 8×8 dot matrix led display.
INPUT USING SERIAL MONITOR
If you’re using the Arduino IDE serial monitor to evaluate an 8×8 LED matrix display, remember that the Serial Monitor is set to No line ending, not both NL and CR. Otherwise, an extra character would appear on the screen.
Excellent site, et bonnes présentations, merci beaucoup.