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:
mangavalkandClaude Opus 5.5 committed 2026-10-12 23:55:15 +02:00
commit 0e4d39c47b
18 files changed
+1905

No files matched your search

+57
View File
@@ -0,0 +1,57 @@
# Arduino Nano: flipdot driver
PlatformIO environment: `nano`
The Nano is connected directly to the Brose panel electronics. It keeps an 84 × 19 frame
buffer and takes drawing commands over serial (115200 baud). It has no clock or network
logic.
## Behaviour
- **Boot:** the Nano flips the whole display on and then off, shows the splash bitmap and
prints the time a full redraw took.
- **`display()`:** compares the new buffer with the last one that was shown and strobes
only the dots that changed.
- **Every 2 minutes** (`REFRESH_TIME`) it forces a full redraw to fix dots that got stuck.
- **Flip pulse length** (µs) is set with the `T` command and stored in EEPROM, so it is
kept after a reboot.
## Serial protocol
Each command is one ASCII line. Coordinates are 2-digit **hex**. Color is `0` (black) or
`1` (yellow). The ESP32 driver (`ESPSERIAL`) only uses `s`, `S`, `F`, `D` and `T`.
| Cmd | Format | Meaning |
|-----|--------|---------|
| `s` | `sXXYYc` | Set pixel in the buffer |
| `S` | `SXXYYc` | Set pixel and flip it right away (direct mode) |
| `F` | `Fc` | Fill the whole buffer |
| `D` | `D` | Push the buffer to the display (changed dots only) |
| `P` | `PXXYYcsTEXT` | Print text at (XX,YY), color `c`, size `s`. `\n` in TEXT starts a new line. |
| `B` | `BXXYYWWHHcHEX...` | Draw a bitmap. WW must be a multiple of 4. Pixel data is one hex digit per 4 pixels. |
| `R` | `R` | Print the buffer as ASCII art on the serial port |
| `T` | `Tnnn` | Set the flip pulse length in µs (decimal), stored in EEPROM |
Example (what the ESP32 sends for one pixel and a refresh):
```
s0a051
D
```
## Wiring (default pinout)
The pins are defined in [lib/BROSE9323/BROSE9323.h](../../lib/BROSE9323/BROSE9323.h).
If you use the PLCC adapter board, build with `-D FLIPDOT_PLCC_ADAPTER` to switch to its
pinout.
| Signal | Nano pin |
|--------|----------|
| ENABLE | D7 |
| ADDR_0 / 1 / 2 (panel select) | D3 / D5 / D6 |
| COL_DATA | D4 |
| COL_0 … COL_4 | D8, D10, D9, D11, D12 |
| ROW_0 … ROW_4 | A3, A4, A2, A0, A1 |
| ROW_RESET | D13 |
| ROW_SET | A5 |
| Serial RX | D0 (from ESP32 TX) |