diff options
| author | Yuval Adam <_@yuv.al> | 2026-01-15 11:28:16 +0100 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2026-01-15 11:28:16 +0100 |
| commit | 7f36a29aa97919fdf394b19cb325a900800fb080 (patch) | |
| tree | cd3ad05632411e77fbee16893875b965e0c8d89a /README.md | |
| parent | fd7c017a6fab43eb1e6fbc39a36b716359a4dc29 (diff) | |
Wifi mqtt and config
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -1,6 +1,6 @@ # hello-t-energy-s3 -Minimal test sketch for LilyGo T-Energy-S3 board. +T-Energy-S3 MQTT battery monitor. Connects to WiFi and publishes battery voltage over MQTT/TLS. ## Setup (one-time) @@ -12,8 +12,21 @@ arduino-cli config add board_manager.additional_urls https://espressif.github.io # Install ESP32 core arduino-cli core update-index arduino-cli core install esp32:esp32 + +# Install PubSubClient library +arduino-cli lib install "PubSubClient" +``` + +## Configuration + +Copy `config.example.h` to `config.h` and fill in your values: + +```bash +cp config.example.h config.h ``` +Then edit `config.h` with your WiFi and MQTT settings. + ## Build & Upload ```bash @@ -33,8 +46,19 @@ arduino-cli monitor --port /dev/ttyACM0 --config baudrate=115200 ## Expected Output ``` -Hello T-Energy-S3! -Battery: 4200 mV +=== T-Energy-S3 MQTT Monitor === + +MAC Address: AA:BB:CC:DD:EE:FF +Scanning WiFi... +Found 5 networks: + 1: MyNetwork (-45 dBm) + ... + +Connecting to MyNetwork... +Connected! IP: 192.168.1.100 +Connecting to MQTT mqtt.example.com:8883... +MQTT connected! Battery: 4200 mV +Published to my/topic: 4200 ... ``` |
