ESP32-S3 RGB LED Matrix Project 3 - Text from mobile phone

ESP32-S3 RGB LED Matrix Project 3 - Text from mobile phone

Project 3 – Control Matrix Text from Your Phone (HTTP Text)

In this project the ESP32-S3 RGB LED Matrix hosts a small web page so you can change the scrolling text, color, direction, and speed directly from your phone or computer. You don’t need a separate app – just a web browser. This makes the module a tiny Wi-Fi text display you can update in real time.

All six projects in this series are explained and demonstrated in one YouTube video. The same video is embedded on this page, so you can see exactly how the web interface looks and how text updates instantly on the matrix. The full source code for this project is automatically loaded below the article, and you can purchase the ESP32-S3 RGB LED Matrix module from affiliate stores listed under the code section.

In this article we focus on how the network logic works (home Wi-Fi vs access point) and which settings you can change in the code to customize the behavior.

ESP32-S3 RGB LED Matrix Module Overview

The hardware is the same as for all the other projects in this series: an ESP32-S3 microcontroller board with a built-in 8×8 RGB LED matrix and a QMI8658C motion sensor on the back. The USB-C port is used for power and programming, and pins around the edges are still available for other IO.:contentReference[oaicite:0]{index=0}

  • ESP32-S3 – Wi-Fi and Bluetooth capable microcontroller.
  • 8×8 RGB matrix – 64 addressable RGB LEDs for text and graphics.
  • QMI8658C accelerometer – used in the tilt and game projects.
  • USB port – powers the board and uploads sketches from Arduino IDE.
  • Exposed pins – allow additional sensors or actuators if needed.
  • Boot/Reset buttons – for firmware upload and restarting.

For Project 3, the most important feature is the ESP32’s Wi-Fi, which lets the board act as a tiny web server for the text control page.:contentReference[oaicite:1]{index=1}

Projects Covered in the Video (Timestamps)

The one video for this series covers all six projects. For quick reference:

  • 00:00 – Introduction
  • 02:01 – Installing ESP32 boards
  • 03:32 – Installing libraries
  • 05:32 – Project 1: Moving Dot
  • 11:11 – Project 2: Text Scroll
  • 12:59Project 3: HTTP Text (this project)
  • 16:41 – Project 4: Tilt Dot
  • 18:55 – Project 5: Arrow Up
  • 20:02 – Project 6: Target Game

You are encouraged to watch the HTTP Text section in the video while working with this article. The video shows how the web page is generated by the ESP32 and how changing text, color, and speed is reflected instantly on the LED matrix.:contentReference[oaicite:2]{index=2}

Installing ESP32 Boards in Arduino IDE

If you have already completed Projects 1 or 2, the board setup is done and you can skip this section. Otherwise, follow these steps in the Arduino IDE:

  1. Open File > Preferences and add the ESP32 boards URL to “Additional Boards Manager URLs”.
  2. Go to Tools > Board > Boards Manager…, search for ESP32, and install the official ESP32 package.
  3. Select the correct ESP32-S3 RGB Matrix board from Tools > Board.
  4. Connect the module via USB and choose the correct serial port under Tools > Port.

Without the proper ESP32 board support and correct port, the web-server sketch will not upload.

Installing NeoMatrix and Required Libraries

This project uses the same libraries as the previous text scroll project:

  • Adafruit NeoMatrix
  • Adafruit NeoPixel
  • Adafruit GFX Library

Install via Library Manager:

  1. Open Sketch > Include Library > Manage Libraries….
  2. Search for Adafruit NeoMatrix and click Install.
  3. Accept the installation of dependencies (Adafruit GFX and Adafruit NeoPixel).

Once installed, you should see the NeoMatrix and NeoPixel example sketches under File > Examples.

Two Wi-Fi Modes in Project 3

The most important concept in this project is that the ESP32 can work in two different modes:

  1. Station (STA) mode – the ESP32 connects to your existing home Wi-Fi network.
  2. Access Point (AP) mode – the ESP32 creates its own Wi-Fi network if home Wi-Fi is not available.

Both modes use the same web interface: an HTML page served from the ESP32 itself, where you can change the text, color, scroll direction, and speed.:contentReference[oaicite:3]{index=3}

Mode 1 – Connect to Home Wi-Fi (Station Mode)

In Station mode, the ESP32 joins your home or office Wi-Fi network. This is the preferred mode whenever your router is available because:

  • Your phone and computer are already connected to the same Wi-Fi network.
  • You can point your browser to the ESP32’s IP address and control the text from any device on that network.

In the settings section of the sketch, you provide your Wi-Fi SSID and password:


// Home Wi-Fi credentials (Station mode)
const char* WIFI_SSID = "YourHomeWiFi";
const char* WIFI_PASS = "YourHomePassword";

After the board boots, it tries to connect to WIFI_SSID. If successful, the code prints the assigned IP address to the Serial Monitor, for example:


Connected to WiFi
IP address: 192.168.1.16

To control the text:

  1. Make sure your phone or PC is connected to the same Wi-Fi network (for example, YourHomeWiFi).
  2. Open a browser and enter the printed IP address, such as http://192.168.1.16/. :contentReference[oaicite:4]{index=4}
  3. The control page will appear, allowing you to type text, choose color, select direction, and adjust scroll speed.

Mode 2 – Standalone Access Point (AP Mode)

If the ESP32 cannot connect to your home Wi-Fi (wrong password, network not available, or you are using the module outside), the sketch automatically falls back to Access Point mode. In AP mode, the ESP32 itself becomes a Wi-Fi hotspot with its own network name and password.

In this project, the AP settings are fixed as:


// Access Point (AP) credentials (fallback mode)
const char* AP_SSID = "ESP32";
const char* AP_PASS = "password";

When Station mode fails, the module switches to AP mode and starts broadcasting a Wi-Fi network called ESP32. To control the matrix:

  1. On your phone or computer, open the Wi-Fi settings and connect to the network ESP32.
  2. Enter the password password (as defined in the code).
  3. Once connected, open a browser and go to http://192.168.4.1/ (the default IP for ESP32 AP mode).
  4. The same control page appears, allowing you to change text, color, speed, and direction.

This fallback behavior makes the project useful anywhere: at home, in the lab, or in a demo environment where no router is available.

Project 3 – Main Settings in the Code

The full HTTP Text sketch is loaded below this article by the website. Here we only document the most important configuration options you are likely to edit.

Wi-Fi and Access Point Settings

At the top of the sketch you will find the Wi-Fi configuration section. Only change the Station (home Wi-Fi) credentials; the AP settings are normally kept as defaults:


// ---------- Wi-Fi SETTINGS ----------

// Home Wi-Fi (Station mode)
const char* WIFI_SSID = "YourHomeWiFi";      // put your router SSID here
const char* WIFI_PASS = "YourHomePassword";  // put your router password here

// Fallback Access Point (AP mode)
const char* AP_SSID = "ESP32";               // fixed AP name
const char* AP_PASS = "password";            // fixed AP password

Behavior:

  • If WIFI_SSID and WIFI_PASS are correct and the network is available → ESP32 connects as a normal Wi-Fi device (Station mode).
  • If connection fails after a timeout → ESP32 starts its own AP using AP_SSID and AP_PASS.

Matrix Pin, Size, and Brightness

These settings are the same as the previous projects:


// Matrix configuration
const int MATRIX_PIN    = 14;   // RGB matrix data pin
const int MATRIX_WIDTH  = 8;
const int MATRIX_HEIGHT = 8;

// Overall display brightness (0–255)
uint8_t matrixBrightness = 40;  // adjust for your environment

Keep MATRIX_PIN at 14 for this board. You can increase matrixBrightness if you need more light, but lower values are more comfortable for close-up viewing.

Default Text and Scroll Settings

When the board starts, it displays an initial message until you open the web page and type a new one. You can change the default text in the configuration:


// Default message shown at startup
String currentText = "Robojax";   // overwrite from web UI later

The rest of the scroll behavior is controlled by a set of variables that are updated by the web interface:


// Scroll delay in milliseconds (lower = faster)
int scrollDelayMs = 50;

// Scroll direction: 0=left, 1=right, 2=up, 3=down
int scrollDirection = 0;   // default: scroll left

The web page sends new values based on the slider and button selections. From the Arduino side, you only need to know that:

  • Decreasing scrollDelayMs makes the text move faster.
  • Increasing scrollDelayMs makes it move slower.
  • Changing scrollDirection switches between left, right, up, or down scroll modes.

Text Color (Controlled from the Web Page)

The color of the text is controlled by three 0–255 values (red, green, blue). They are updated whenever you choose a new color on the web page:


// Current text color (R, G, B)
uint8_t textRed   = 255;
uint8_t textGreen = 255;
uint8_t textBlue  = 255;

When you pick a color in the browser and click Apply, the ESP32 parses the RGB values and updates these three variables; the text immediately changes color on the matrix. In the video, this behavior is demonstrated with multiple color changes, including red, green and blue examples.:contentReference[oaicite:5]{index=5}

Summary

Project 3 turns your ESP32-S3 RGB LED Matrix into a fully wireless text display that you can control using any device with a web browser. The sketch is designed to be robust:

  • It first tries to connect to your home Wi-Fi using the SSID and password you configured.
  • If that fails, it automatically becomes an access point with the name ESP32 and password password.
  • In both modes, opening the correct IP address in a browser displays the same control page for text, color, direction, and speed.

The complete HTTP Text code is available below this article (loaded automatically on the website). For a full step-by-step walk-through and a live demonstration of how the text updates in real time, make sure to watch the Project 3 section of the video. If you would like to build the project yourself, you can also purchase the ESP32-S3 RGB LED Matrix module using the affiliate links listed beneath the code.

Bilder

ESP32 S3 Matrix
ESP32 S3 Matrix
ESP32 S3 Matrix  pin out
ESP32 S3 Matrix pin out
ESP32-S3_RGB_8x8_matrix-3
ESP32-S3_RGB_8x8_matrix-3
ESP32 S3 Matrix displaying rainbow heart
ESP32 S3 Matrix displaying rainbow heart
ESP32-S3_RGB_8x8_matrix1
ESP32-S3_RGB_8x8_matrix1
ESP32-S3_RGB_8x8_matrix-2
ESP32-S3_RGB_8x8_matrix-2
ESP32-S3 RGB Matrix- Mobile Phone Text
ESP32-S3 RGB Matrix- Mobile Phone Text
801-ESP32-S3 RGB LED Matrix Project 3 - Text from mobile phone
Sprache: C++
Kopiert!

Dinge, die Sie vielleicht brauchen

Ressourcen & Referenzen

Noch keine Ressourcen vorhanden.

Dateien📁

Keine Dateien verfügbar.