60 lines
2.8 KiB
C
60 lines
2.8 KiB
C
// =====================================================================
|
|
// config.example.h
|
|
//
|
|
// Copy this file to "config.h" (same folder) and edit the values
|
|
// below. "config.h" is meant to be gitignored so you don't commit
|
|
// your Wi-Fi password.
|
|
// =====================================================================
|
|
#pragma once
|
|
|
|
// ---------------------------------------------------------------
|
|
// Wi-Fi credentials
|
|
// ---------------------------------------------------------------
|
|
#define WIFI_SSID "OrangePiVietnam"
|
|
#define WIFI_PASSWORD "orangepi.vn"
|
|
|
|
// ---------------------------------------------------------------
|
|
// Radar UART pins (ESP32-S3, HardwareSerial — NOT SoftwareSerial)
|
|
// Change these to match your wiring. Any two free GPIOs that
|
|
// support UART RX/TX on your ESP32-S3 board will work.
|
|
// ---------------------------------------------------------------
|
|
#define RADAR_RX_PIN 17 // ESP32-S3 RX <- LD2453 TX
|
|
#define RADAR_TX_PIN 18 // ESP32-S3 TX -> LD2453 RX
|
|
#define RADAR_UART_PORT 1 // which HardwareSerial to use (Serial1 or Serial2)
|
|
|
|
// Default LD2453 UART settings. 8N1 is assumed by analogy with the
|
|
// rest of the Hi-Link 24xx radar family; this has NOT been confirmed
|
|
// against the official LD2453 manual. Verify with DEBUG_RADAR_RAW
|
|
// before trusting any parsed output.
|
|
#define RADAR_BAUD_RATE 256000
|
|
|
|
// ---------------------------------------------------------------
|
|
// Node identity — for the future multi-radar (LD2453 A/B/C -> UDP
|
|
// -> Orange Pi) architecture. Not used for networking yet, but every
|
|
// frame is tagged with this so the plumbing is ready later.
|
|
// ---------------------------------------------------------------
|
|
#define NODE_ID "RADAR_A"
|
|
|
|
// ---------------------------------------------------------------
|
|
// OLED Display (I2C 128x64)
|
|
// ---------------------------------------------------------------
|
|
#define OLED_ENABLED 1 // 1 = enable OLED display, 0 = disable
|
|
#define OLED_SDA_PIN 7 // I2C SDA pin
|
|
#define OLED_SCL_PIN 6 // I2C SCL pin
|
|
#define OLED_I2C_ADDR 0x3C // I2C address (0x3C or 0x3D, check your module)
|
|
|
|
// ---------------------------------------------------------------
|
|
// Debug / diagnostic switches
|
|
// ---------------------------------------------------------------
|
|
// 1 = print every raw UART frame candidate as hex on the Serial
|
|
// Monitor (115200). Use this to capture real traffic from the
|
|
// module so the frame format can be confirmed/reverse-engineered.
|
|
#define DEBUG_RADAR_RAW 1
|
|
|
|
// 1 = diagnostic mode only: Serial-only target printout, no Wi-Fi,
|
|
// no web server, no WebSocket. This is the recommended first
|
|
// stage — get the parser confirmed against real hardware before
|
|
// bringing up networking.
|
|
// 0 = full stage-2 firmware: Wi-Fi + REST API + WebSocket + zones.
|
|
#define DIAGNOSTIC_MODE 1
|