Ikẹkọ yii jẹ apakan ti: Matrix LED ESP32-S3 RGB
Iṣẹ́ àkànṣe láti ṣẹ̀dá fún àwọn ohun èlò ìgbádùn àti ìwúlò nípa lílo module ESP32-S3 RGB Matrix. Àwọn ìjápọ̀ sí àwọn fídíò mìíràn wà ní ìsàlẹ̀ àpilẹ̀kọ yìí.
Iṣẹ́ Aago Nẹ́tíwọọkì ESP32-S3 RGB LED Matrix - Àwọ̀ àìròtẹ́lẹ̀ mẹ́rin
Aago ESP32-S3 pẹ̀lu Àwọn Àwọ̀ RGB Àìrọ̀rùn
Iṣẹ́ yìí jẹ́ Aago Ayélujára ESP32-S3 RGB Matrix tí ó ń sopọ̀ mọ́ Wi-Fi, tí ó ń ṣàmúṣọ̀ àkókò àdúgbò láti olùpèsè NTP, tí ó sì ń yí àkókò ní ọ̀nà HH:MM kọjá lórí 8×8 RGB NeoMatrix tí ó wà nínú rẹ̀. Nínú ẹ̀yà yìí, àwọn wákàtí, àmì ìfọ̀rọ̀wérọ̀, àti ìṣẹ́jú ni a ń ṣe ní àwọn àwọ̀ àìrọ̀rùn tí a yàn ní gbogbo ìyípo ìṣíwọ̀ kíkún, tí ó ń dá àfihàn aago tí ó ní ìmúyọ̀ àti eré tí ó ń yípadà nígbà gbogbo.

Bí aago yìí ṣe ń ṣiṣẹ́
Lẹ́yìn tí a bá fi agbára sí bọ́ọ̀dù náà nípasẹ̀ USB-C, ESP32-S3 ń sopọ̀ mọ́ nẹ́tíwọ̀kì Wi-Fi rẹ, ó sì ń gba àkókò àdúgbò lọ́wọ́lọ́wọ́ láti ayélujára. A pín àkókò náà sí mẹ́ta—wákàtí, àmì ìfọ̀rọ̀wérọ̀, àti ìṣẹ́jú—àti pé a ń ya apá kọ̀ọ̀kan lọ́tọ̀ọ̀tọ̀ lórí RGB matrix. Nígbà tí ọ̀rọ̀ náà bá yí kúrò pátápátá lórí iboju, a yan àwọn àwọ̀ àìrọ̀rùn tuntun fún ìgbà tí ó tẹ̀lé.
Àwọn ilé-ìkàwé tí a lò
Sketch yìí ń lo àwọn ilé-ìkàwé wọ̀nyí:

#include <WiFi.h>
#include "time.h"
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
Fi Adafruit NeoMatrix sọ̀rọ̀ láti inú Arduino Library Manager. Àwọn ohun tí ó gbẹ́kẹ̀lé bíi Adafruit GFX Library àti Adafruit NeoPixel yóò fi ara wọn sílẹ̀ lọ́nà àìdáni.

Ìtòlẹ́tò olùmúlò pàtàkì
Pínì data matrix (RGB matrix tí ó wà nínú)
Bí ó tilẹ̀ jẹ́ pé RGB matrix wà nínú bọ́ọ̀dù náà, pínì data náà gbọ́dọ̀ jẹ́ ìtumọ̀ síbẹ̀ nínú kóòdù náà:

#define MATRIX_PIN 14
GPIO 14 ni a ń lò ní ọ̀pọ̀lọpọ̀ lórí àwọn bọ́ọ̀dù ESP32-S3 RGB matrix. Bí ẹ̀yà bọ́ọ̀dù rẹ bá lo pínì ọ̀tọ̀ọ̀tọ̀, ṣàtúnṣe iye yìí ní àbọ̀.
Wi-Fi SSID àti ọ̀rọ̀ìpamọ́ (tí ó ṣe pàtàkì ní ọ̀nà àwọ̀)
Rọ́pò àwọn ìdánimọ̀ Wi-Fi pẹ̀lú àwọn àlàyé nẹ́tíwọ̀kì tirẹ:
const char* WIFI_SSID = "Wi-Fi SSID rẹ";
const char* WIFI_PASSWORD = "passW0rd";
Pàtàkì: Àwọn SSID Wi-Fi jẹ́ pàtàkì ní ọ̀nà àwọ̀. SSID kan tí a ń pè ní "Book" kò jọ̀ọ́ "book". Bí àwọ̀ ńlá kò bá bá àwọ̀ kékeré mu pátápátá, ESP32-S3 yóò kùnà láti sopọ̀.
Olùpèsè NTP, agbègbè àkókò, àti ìmúkúrò ọjọ́
A ṣe ìṣàmúṣọ̀ àkókò nípasẹ̀ olùpèsè NTP ayélujára kan:
const char* ntpServer = "pool.ntp.org";
A ṣe ìṣirò àkókò àdúgbò ní lílo àwọn ìyàtọ̀ UTC àti ìmúkúrò ọjọ́:
// Toronto-ish: UTC-5, pẹ̀lú wákàtí 1 DST
const long gmtOffset_sec = -5 * 3600;
const int daylightOffset_sec = 3600;
gmtOffset_sec: Ìyàtọ̀ UTC ní ìṣẹ́jú-ààyè (ṣàtúnṣe fún ibùdó rẹ)daylightOffset_sec: Lo3600nígbà tí DST bá ń ṣiṣẹ́, tàbí0bí kò bá rí bẹ̀ẹ̀
A ń lo àwọn ètò wọ̀nyí nípasẹ̀:
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
Ìmúlẹ̀ ọ̀fẹ́ ọjọ́ / alẹ́ lọ́nà àìdáni
Aago náà ń ṣàtúnṣe ìmúlẹ̀ lọ́nà àìdáni ní ìbámu pẹ̀lú wákàtí lọ́wọ́lọ́wọ́:
const int DAY_BRIGHTNESS = 40;
const int NIGHT_BRIGHTNESS = 5;
const int NIGHT_START_HOUR = 22;
const int NIGHT_END_HOUR = 6;
Láàárín 10 PM àti 6 AM, àfihàn náà ń ṣókùn láti dín ìtànṣán kù ní àwọn ibi tí ó ṣókùnkùn. Ní àwọn wákàtí ọ̀sán, matrix náà ń padà sí ìmúlẹ̀ déédé.
Ìwà àwọ̀ RGB àìrọ̀rùn
A tọ́jú àkójọpọ̀ àwọn àwọ̀ RGB tí a ti yàn tẹ́lẹ̀ nínú array kan, níbi tí a ti ṣàlàyé àwọ̀ kọ̀ọ̀kan ní lílo àwọn iye Pupa, Aláwọ̀ ewé, àti Bulu láti 0 sí 255:
uint8_t userColors[][3] = {
{255, 0, 0}, // Pupa
{0, 255, 0}, // Aláwọ̀ ewé
{0, 0, 255}, // Bulu
{255, 165, 0}, // Ọsàn
{255, 0, 255}, // Magenta
{0, 255, 255}, // Cyan
{255, 255, 0} // Ìyèèyè
};
Ní gbogbo ìyípo ìṣíwọ̀ kíkún:
- Àwọn ọ̀rọ̀ wákàtí ni a yàn àwọ̀ àìrọ̀rùn kan
- Àmì ìfọ̀rọ̀wérọ̀ gba àwọ̀ àìrọ̀rùn ọ̀tọ̀ọ̀tọ̀
- Àwọn ọ̀rọ̀ ìṣẹ́jú gba àwọ̀ àìrọ̀rùn mìíràn
Èyí ń mú ìdàpọ̀ àwọ̀ tí ó ń yípadà nígbà gbogbo tí ó ń mú kí aago náà wúni lórí ní ojú. Láti dá àwọn àwọ̀ àṣà tirẹ, o lè lo ọ̀pá irinṣẹ́ Yàn Àwọ̀ RGB: Yàn Àwọ̀ RGB.
Ìmọ̀-ọ̀nà ìfihàn àkókò
A pín àkókò náà sí àwọn ẹ̀yà mẹ́ta:
- Wákàtí:
HH - Àmì ìfọ̀rọ̀wérọ̀:
: - Ìṣẹ́jú:
MM
A ya apá kọ̀ọ̀kan lọ́tọ̀ọ̀tọ̀ kí ó lè ní àwọ̀ tirẹ, nígbà tí gbogbo àwọn apá ń gbé papọ̀ láti dá ìmúyọ̀ ìṣíwọ̀ dídán lórí àfihàn 8×8.
Ìdá àwọ̀ àìrọ̀rùn
Láti rí i dájú pé àwọ̀ jẹ́ àìrọ̀rùn, sketch náà ń gbin nọ́mbà àìrọ̀rùn ní ìbẹ̀rẹ̀ ní lílo pínì analog tí kò sopọ̀:
randomSeed(analogRead(0));
Èyí ń rí i dájú pé àwọn ìdàpọ̀ àwọ̀ yàtọ̀ ní gbogbo ìgbà tí a bá mú agbára wọlé àti ní gbogbo ìyípo ìṣíwọ̀.
Ìfihàn
Lẹ́yìn tí a bá gbé sketch náà sílẹ̀ tí a sì fi agbára sí bọ́ọ̀dù náà nípasẹ̀ USB-C:
- ESP32-S3 ń sopọ̀ mọ́ nẹ́tíwọ̀kì Wi-Fi rẹ
- A ṣe ìṣàmúṣọ̀ àkókò láti ayélujára
- Àkókò ń yí ní ọ̀nà
HH:MM - Wákàtí, àmì ìfọ̀rọ̀wérọ̀, àti ìṣẹ́jú ń yí padà sí àwọn àwọ̀ àìrọ̀rùn ní gbogbo ìyípo
- Àfihàn náà ń ṣókùn lọ́nà àìdáni ní alẹ́
Àwọn ìgbàlódé àti àwọn ọ̀nà
Kòd orijinal konplè a bay anba atik sa a. Zouti itil ak referans yo lye anba atik sa a.
Ikẹkọ yii jẹ apakan ti: Matrix LED ESP32-S3 RGB
- Iṣẹ́ ESP32-S3 RGB LED Matrix 1- Àmì-ojú ìpilẹ̀ṣẹ̀
- Iṣẹ́ ESP32-S3 RGB LED Matrix Project 2 - Ọ̀rọ̀ Tí Ń Rìn
- Iṣẹ́ ESP32-S3 RGB LED Matrix Project 3 - Ọ̀rọ̀ láti fóónù alágbèéká
- Iṣẹ́ ESP32-S3 RGB LED Matrix Project 4 - Tilt dot
- Iṣẹ́ ESP32-S3 RGB LED Matrix Project 5 - Ọfà tí ó máa ń tọ́ka sí òkè nígbà gbogbo
- Iṣẹ́ ESP32-S3 RGB LED Matrix Project 6 - Ere Cible
- Iṣẹ́ Aago ESP32-S3 RGB LED Matrix Wi-Fi + NTP - 1 Aago Ìpìlẹ̀
- Iṣẹ́ Aago Internet Matrix LED RGB ESP32-S3 - Àfihàn Aago àti Ọjọ́ ní Àwọ̀ púpọ̀ 2
- Iṣẹ́ Aago Internet Matrix LED RGB ESP32-S3 - Àwọ̀ Alẹ́ 3 pẹ̀lú Ọjọ́
- Iṣẹ́ Aago Internet Matrix LED RGB ESP32-S3 - Àwọ̀ Òṣùwọ̀n 5
- ESP32-S3 RGB LED Matrix test for RGB, GRB setting
/*
* =====================================================================================
* ESP32-S3 INTERNET RGB CLOCK (8x8 Matrix) - Project 4- Random Color
* =====================================================================================
watch video https://youtube.com/shorts/4iWjLiD7fS8
📚⬇️ Download and resource page https://robojax.com/RJT843
* Author: Gemini (AI Thought Partner) & Ahmad Shamshiri (Robojax.com)
* Date: 07 Jan 2026
* * FEATURES:
* 1. WiFi/NTP Time: Syncs automatically with internet time servers.
* 2. Cycle-Based Color: Color changes ONLY after the time finishes a full scroll.
* 3. Auto-Brightness: Dims the LEDs during night hours (User-configurable).
* =====================================================================================
*/
/*
* =====================================================================================
* ESP32-S3 INTERNET CLOCK - MULTI-COLOR ELEMENTS
* =====================================================================================
* Each part of the time (HH : MM) gets a different random color from your list.
* Colors only change once the full scroll cycle is finished.
* =====================================================================================
*/
#include <WiFi.h>
#include "time.h"
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#define MATRIX_PIN 14
// --- CONFIGURATION ---
const int DAY_BRIGHTNESS = 40;
const int NIGHT_BRIGHTNESS = 5;
const int NIGHT_START_HOUR = 22;
const int NIGHT_END_HOUR = 6;
uint8_t userColors[][3] = {
{255, 0, 0}, // Red
{0, 255, 0}, // Green
{0, 0, 255}, // Blue
{255, 165, 0}, // Orange
{255, 0, 255}, // Magenta
{0, 255, 255}, // Cyan
{255, 255, 0} // Yellow
};
int totalColors = sizeof(userColors) / sizeof(userColors[0]);
// Variables to store the current random color indices
int hourColorIdx = 0;
int colonColorIdx = 1;
int minColorIdx = 2;
// --- GLOBALS ---
Adafruit_NeoMatrix matrix(8, 8, MATRIX_PIN,
NEO_MATRIX_TOP + NEO_MATRIX_LEFT +
NEO_MATRIX_ROWS + NEO_MATRIX_PROGRESSIVE,
NEO_RGB + NEO_KHZ800);
char hourText[3], minText[3];
int16_t scrollX = 8;
unsigned long lastScrollMs = 0;
const uint16_t scrollIntervalMs = 100;
// 👇 REPLACE these with your real home WiFi name & password
const char* WIFI_SSID = "your WiFi SSID";
const char* WIFI_PASSWORD = "passW0rd";
// NTP (time) server
const char* ntpServer = "pool.ntp.org";
// Toronto-ish: UTC-5, plus 1 hour DST
const long gmtOffset_sec = -5 * 3600; // -5 hours
const int daylightOffset_sec = 3600; // +1 hour for DST
void updateTimeParts() {
struct tm timeinfo;
if (!getLocalTime(&timeinfo)) return;
snprintf(hourText, sizeof(hourText), "%02d", timeinfo.tm_hour);
snprintf(minText, sizeof(minText), "%02d", timeinfo.tm_min);
if (timeinfo.tm_hour >= NIGHT_START_HOUR || timeinfo.tm_hour < NIGHT_END_HOUR) {
matrix.setBrightness(NIGHT_BRIGHTNESS);
} else {
matrix.setBrightness(DAY_BRIGHTNESS);
}
}
void scrollTime() {
matrix.fillScreen(0);
int x = scrollX;
// 1. Draw Hours
matrix.setTextColor(matrix.Color(userColors[hourColorIdx][0], userColors[hourColorIdx][1], userColors[hourColorIdx][2]));
matrix.setCursor(x, 0);
matrix.print(hourText);
x += 12; // Move 12 pixels (2 digits * 6px)
// 2. Draw Colon
matrix.setTextColor(matrix.Color(userColors[colonColorIdx][0], userColors[colonColorIdx][1], userColors[colonColorIdx][2]));
matrix.setCursor(x, 0);
matrix.print(":");
x += 6; // Move 6 pixels
// 3. Draw Minutes
matrix.setTextColor(matrix.Color(userColors[minColorIdx][0], userColors[minColorIdx][1], userColors[minColorIdx][2]));
matrix.setCursor(x, 0);
matrix.print(minText);
matrix.show();
scrollX--;
// Total width is roughly 30 pixels (HH=12, :=6, MM=12)
if (scrollX < -30) {
scrollX = matrix.width();
// Pick NEW random colors for the next cycle
hourColorIdx = random(0, totalColors);
colonColorIdx = random(0, totalColors);
minColorIdx = random(0, totalColors);
}
}
void setup() {
Serial.begin(115200);
// Seed the random generator using an unconnected analog pin
randomSeed(analogRead(0));
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
while (WiFi.status() != WL_CONNECTED) delay(500);
// Configure time via NTP
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
Serial.println("Waiting for time...");
delay(2000); // small wait for initial sync
matrix.begin();
matrix.setTextWrap(false);
matrix.setBrightness(DAY_BRIGHTNESS);
}
void loop() {
if (millis() % 1000 == 0) updateTimeParts();
if (millis() - lastScrollMs >= scrollIntervalMs) {
lastScrollMs = millis();
scrollTime();
}
}
Orisun & itọkasi
-
Fídíò
-
Ináàbò🎨 Color picker Toolrobojax.com
Fáìlìs📁
Fayile Fritzing
-
esp32-S3-supermini-tht fritzing part
esp32-S3-supermini-tht.fzpz0.02 MB