Showing posts with label max7219. Show all posts
Showing posts with label max7219. Show all posts

Friday, October 19, 2018

Control LED board by phone with ESP8266 and MAX7219

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

NoDescriptionQuantity
1NodeMCU ESP12E1
24 LED Boards with MAX72191
35V Power Supply1

Procedures

  1. Connect the LED Board to Power Supply:

    • Connect the LED board to the 5V power supply.
  2. 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)
  3. 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.
  4. Setup Arduino IDE:

    • Configure the Arduino IDE with the appropriate settings for NodeMCU 12E.
  5. Set Up WiFi Access Point (AP):

    • Configure the ESP8266 to act as a WiFi Access Point.
  6. Handle Requests:

    • Write void functions to handle the requests corresponding to each button (LEFT, RIGHT, SOS).
  7. View My Code:

    • The code for this project is available here.
  8. Video Tutorial:

Good Luck!