Files
Flipdot-display/lib/BROSE9323
mangavalkandClaude Opus 5.5 090c2bf8ae Fix shifted pictures: non-blocking Nano drawing, frame check, refresh settings
The Nano's periodic full redraw blocked for ~0.8 s. A frame that arrived
meanwhile overflowed its 64-byte serial buffer; lost bytes in a bitmap
shift the rest of the image (picture moved up), and diff frames never
repaired it.

- Nano: all drawing (frames, effects, the dot refresh) runs from update()
  in ~1 ms slices; the refresh pauses while a frame is received or shown
- New commands: C (reply with the image checksum) and I (refresh minutes,
  EEPROM)
- ESP32: NanoMonitor asks for the checksum after frames and sends the whole
  image again on a mismatch, missing answer or Nano restart; counts ERR
  replies. Periodic whole-image resync.
- Settings: "Dot refresh" and "Image resync" intervals (settings v5,
  v4 records are migrated)
- System tab: loop timing, free memory, frame check counts
- test_driver: the real driver against a simulated panel

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:20:26 +02:00
..

BROSE9323 driver

An Adafruit_GFX driver for Brose flipdot panels, shared by both firmware targets. The constructor is BROSE9323(width, height, panel_width, flip_time_us = 280). This project uses BROSE9323 display(84, 19, 28).

Build modes

Flag Used by Behaviour
(none) Nano Drives the panel through GPIO. Keeps an old and a new frame buffer and flips only the dots that changed.
-D ESPSERIAL ESP32 Holds no buffer. drawPixel, fillScreen, display and setTiming are sent as serial commands to the Stream passed to begin(&Serial).
-D FLIPDOT_PLCC_ADAPTER Nano (optional) Uses the pin mapping of the PLCC adapter board.

The flags are set per environment in platformio.ini through build_flags. Don't #define them in the header.

Notes

  • In direct mode (setDirect(true)) every pixel is flipped right away, without a call to display().
  • setGap(us) adds a pause after each flip pulse, setPulses(n) pulses each changed dot n times. Full redraws (display(true), the first display() after boot) pulse the dots that look unchanged only once.
  • setEffect(effect, ms): how display() shows a frame (RefreshEffect in dot_sequence.h). Anything but EFFECT_INSTANT runs in steps from update(), which must be called often; busy() says whether an effect is running. display(true) is always instant. On the ESP32 these calls become the G, N and E commands.
  • print() maps German umlauts (ÄäÖöÜüß) to the code page 437 glyphs used by the GFX font.
  • On an ATmega168 the old buffer is left out to save RAM. Every display() call then flips all dots.