Home / Projects / ESP32 Projects / ESP32 MAX7219 WiFi Message Board
ESP32 MAX7219 WiFi Message Board

ESP32 MAX7219 WiFi Message Board

This ESP32-powered project allows you to write messages to a MAX7219 LED matrix display using your smartphone. Scaled up, this can be used as a WiFi message board for schools or signages for businesses.

Materials

  • ESP32 (NodeMCU-32S)
  • 4 x 8 x 8 LED Dot Matrix with MAX7219
  • Breadboard, Connecting Wires, Power Source

The ESP32 microcontroller acts as the web server which the user connects to to send messages. The microcontroller retains the previous message even if turned off.

This project uses the Arduino IDE to code the ESP32. There are different ESP32 boards so to be specific, I am using the NodeMCU-32S:

NodeMCU-32S Pinout

The cascaded dot matrix module in this project contains one MAX7219 IC per matrix which simplifies control:

cascaded dot matrix


I have previously shown how to use this module with an Arduino UNO. Thankfully, the same library in that article supports ESP32.

ESP32 MAX7219 Wiring Diagram

ESP32 MAX7219 WiFi Message Board Wiring

The MAX7219 communicates to microcontrollers via SPI. The ESP32 has three (usable) SPI ports but somehow, the LEDMatrixDriver library defaults to SPI3. Hence, the SDO and SCK pins are GPIO23 and GPIO18 respectively. However, the CS pin is not the default pin since the library requires you to declare it (GPIO15 in this project).

Web App

ESP32 Max7219 WiFi Message Board App

The user enters the message to be displayed on the web app. This app is accessible through a web browser with its address being the ESP32's local IP address. Hence, the ESP32 must connect to the same WiFi as the user.

The app contains a HTML form that sends the message inside the text field when the send button is clicked.

Here’s the HTML of the app:

Unlike my previous projects, this app contains no JavaScript code. Sending the data to the server relies solely on form handling.

ESP32 Code

While the wiring is simple, writing the code for this project is challenging. It involves establishing the web server, handling POST data, reading/writing strings from/to EEPROM and then displaying the message to the LED dot matrix.

The HTML of the web app is stored as a constant ('page') inside a separate mainpage.h”. This constant executes every time the user (web client) accesses the home page:

Then when the client submits the form with the message, the ESP32 serves the “dataHandler” page:

This executes a datahandler() function which reads the message and saves it to EEPROM:

The “message” variable is a global string. Inside loop() the message variable is passed through the writeToMatrix() function. This function sends the string message to the MAX7219 to be displayed on the LED matrix.

The writeToMatrix() function here needs to be inside a loop to generate a running message in the LED matrix.

The full source code is in my repository. Again, make sure to download and install the LEDMatrixDriver library first.

Output Video

Unlike my servo controller project, this one reacts almost instantaneously when the user clicks send. I limited the message to 100 characters only. Also, there’s no font for small letters so all messages convert to upper case letters.

I hope you find this project useful. For questions, reactions or suggestions, kindly drop a comment below!

Check Also

ESP32-WROOM-32

Using ESP32 (NodeMCU-32S) Board for the First Time

The ESP32 expands the capabilities of the popular ESP8266 WiFi microcontroller by using a 32-bit …

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.