Testing NodeMCU with 4 x 8x8 LED Matrix
Date: 10/19/2018
Introduction
This project aims to use a smartphone to control an LED board as a turning signal. The ESP8266 will serve multiple roles: Access Point, microcontroller, and server. The web server will host a simple webpage featuring three buttons: "Turn LEFT," "Turn RIGHT," and "Turn SOS." These commands will trigger scrolling text on the LED boards.
Initially, I tested two libraries: Arduino Core WiFi and ESP8266WebServer. While Arduino Core WiFi lacked efficient request handling (requiring the use of client.readStringUntil(\r)
which was slow), the ESP8266WebServer library performed well and was selected for this project.
Required Items
No | Description | Quantity |
---|---|---|
1 | NodeMCU ESP12E | 1 |
2 | 4 LED Boards with MAX7219 | 1 |
3 | 5V Power Supply | 1 |
Procedures
Connect the LED Board to Power Supply:
- Connect the LED board to the 5V power supply.
Wire the MAX7219 to NodeMCU:
- Connect the following pins:
- VCC to 5V
- GND to GND
- DIN to D7 (MOSI - GPIO 13)
- CS to D8 (GPIO 15)
- CLK to D5 (GPIO 14)
- Connect the following pins:
Identify the LED Board Type:
- Determine the type of LED board you are using. In this example, I used the FC16_HW type. You can read more about it here.
Setup Arduino IDE:
- Configure the Arduino IDE with the appropriate settings for NodeMCU 12E.
Set Up WiFi Access Point (AP):
- Configure the ESP8266 to act as a WiFi Access Point.
Handle Requests:
- Write
void
functions to handle the requests corresponding to each button (LEFT, RIGHT, SOS).
- Write
View My Code:
- The code for this project is available here.
Video Tutorial:
- For a visual guide, watch this YouTube video.
Good Luck!