Public Access
Restructure into a single PlatformIO project with nano and esp32 targets
- Shared BROSE9323 driver in lib/, ESPSERIAL selected via build_flags - Nano firmware in src/nano, ESP32 firmware in src/esp32 - Move WiFi/MQTT credentials to gitignored secrets.h (template provided) - Pin home-assistant-integration to 2.1.0 from the registry - Add esp32_usb environment for first flash / recovery - Add READMEs and CLAUDE.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
0e4d39c47b
18 files changed
+1905
No files matched your search
@@ -0,0 +1,45 @@
|
||||
# ESP32: controller
|
||||
|
||||
PlatformIO environments: `esp32` (OTA) and `esp32_usb` (USB)
|
||||
|
||||
The ESP32 decides what is shown on the display. It never touches the panel itself. The
|
||||
BROSE9323 driver is built with `-D ESPSERIAL`, so every GFX call is sent over `Serial`
|
||||
(115200 baud) to the Nano.
|
||||
|
||||
## Files
|
||||
|
||||
| File | Contents |
|
||||
|------|----------|
|
||||
| `main.cpp` | setup, OTA, clock / power logic, Home Assistant callbacks |
|
||||
| `libs.h` | includes and global objects (display, MQTT, WiFi, pins, timezone) |
|
||||
| `bitmaps.h` | 1-bit bitmaps (Pikachu, thought bubble, Nintendo logo, ...) |
|
||||
| `secrets.example.h` | template for `secrets.h` (WiFi and MQTT credentials, **gitignored**) |
|
||||
|
||||
## Features
|
||||
|
||||
- **OTA updates** through ArduinoOTA. Hostname: `FlipDotDisplay`.
|
||||
- **OTA panic window:** after a crash or watchdog reset, the ESP32 runs only the OTA
|
||||
handler for 15 seconds before it starts the main code. A firmware that crashes on boot
|
||||
can still be replaced over the air.
|
||||
- **NTP time** with timezone `CET-1CEST,M3.5.0,M10.5.0/3` (Europe/Amsterdam).
|
||||
- **Home Assistant** through MQTT (`home-assistant-integration` library) with two switches:
|
||||
- `FlipDotDisplayClock`: clock on, or the Nintendo logo when off
|
||||
- `FlipDotDisplayPower`: turns the display off through the relay
|
||||
- **Relay on GPIO 13** switches the display's power supply. `LOW` turns it on.
|
||||
- **Status LED** (built-in) blinks fast when WiFi is down and slowly when connected. It is
|
||||
off at night or when the display is powered off.
|
||||
|
||||
## Schedule
|
||||
|
||||
| Time | Display |
|
||||
|------|---------|
|
||||
| 07:00 – 17:00 | Pikachu and the clock, updated every minute |
|
||||
| 17:00 – 22:00 | Yawning Pikachu and the clock |
|
||||
| 22:00 – 23:30 | Clock drawn only on the quarter hour; power is off in between |
|
||||
| night | Screen cleared, power off |
|
||||
|
||||
## Adding bitmaps
|
||||
|
||||
Convert an image with [image2cpp](https://javl.github.io/image2cpp/) to "Arduino code",
|
||||
horizontal, 1 bit per pixel. Paste the array into `bitmaps.h` and draw it with
|
||||
`display.drawBitmap(x, y, bitmap, w, h, 1)`. The display is 84 × 19 pixels.
|
||||
Reference in new issue
Block a user