add oled 12864

This commit is contained in:
admin committed 2026-09-11 13:25:42 +07:00
1 parent d163397de4
commit 4c68deb6bb
6 files changed
+327 -2

No files matched your search

+43 -1
View File
@@ -44,14 +44,24 @@ capture) is fully implemented and ready to go.
## Wiring
### LD2453 Radar
```
LD2453 ESP32-S3
LD2453 ESP32-S3
V -> 3V3
G -> GND
T/TX -> RADAR_RX_PIN (default GPIO18)
R/RX -> RADAR_TX_PIN (default GPIO17)
```
### OLED Display I2C 128x64
```
OLED ESP32-S3
VCC -> 3V3
GND -> GND
SCL -> GPIO7 (OLED_SCL_PIN)
SDA -> GPIO6 (OLED_SDA_PIN)
```
Change `RADAR_RX_PIN` / `RADAR_TX_PIN` in `config.h` to match your
wiring — any two free GPIOs that support UART on your ESP32-S3 board
will work, since the ESP32 Arduino core remaps UART pins in software.
@@ -83,10 +93,42 @@ ESP32_LD2453/
LD2453Parser.h/.cpp - UART acquisition + frame parsing (STUBBED, see above)
ZoneManager.h/.cpp - rectangular zone occupancy logic
WebServerManager.h/.cpp - Wi-Fi, REST API, WebSocket broadcast
OLEDDisplay.h/.cpp - OLED I2C 128x64 display manager
config.example.h - copy to config.h and edit
README.md
```
## OLED Display Features
Màn hình OLED 128x64 hiển thị các thông tin:
### DIAGNOSTIC_MODE = 1 (Serial Debug Mode)
- **Màn hình boot**: Hiển thị logo và Node ID
- **Chế độ Diagnostic**: Thông báo Serial-only mode
- **Thống kê radar mỗi 5 giây**:
- Số bytes nhận được từ LD2453
- Số frames đã parse
- Số lỗi parse
- Packets per second (PPS)
- Số target phát hiện được
### DIAGNOSTIC_MODE = 0 (Full WiFi Mode)
- **Kết nối WiFi**: Hiển thị SSID đang kết nối
- **WiFi thành công**: Hiển thị địa chỉ IP
- **Detection realtime**:
- Số target phát hiện (T:0-3)
- Trạng thái 3 zones (YES/NO)
### Cấu hình OLED trong config.h
```cpp
#define OLED_ENABLED 1 // 1 = bật OLED, 0 = tắt
#define OLED_SDA_PIN 6 // Chân SDA
#define OLED_SCL_PIN 7 // Chân SCL
#define OLED_I2C_ADDR 0x3C // Địa chỉ I2C (thường là 0x3C hoặc 0x3D)
```
**Lưu ý**: Nếu màn hình không hoạt động, hãy thử đổi `OLED_I2C_ADDR` từ `0x3C` sang `0x3D`.
## Stage 1: diagnostic mode (do this first)
1. Copy `config.example.h` to `config.h`.