Skip to content

Add Waveshare ESP32-S3-Touch-LCD-1.83 board support#77

Open
florianalber wants to merge 3 commits into
HermannBjorgvin:mainfrom
florianalber:add-waveshare-lcd-183
Open

Add Waveshare ESP32-S3-Touch-LCD-1.83 board support#77
florianalber wants to merge 3 commits into
HermannBjorgvin:mainfrom
florianalber:add-waveshare-lcd-183

Conversation

@florianalber

Copy link
Copy Markdown

What

Adds a board port for the Waveshare ESP32-S3-Touch-LCD-1.83 (240×284).

This is the first SPI TFT port — the panel is an ST7789P driven over 4-wire SPI rather than a QSPI AMOLED, and the board has no XCA9554 IO expander (LCD/touch resets are plain GPIOs, backlight is a PWM-dimmed LED string). Touch (CST816D @ 0x15), PMU (AXP2101) and IMU (QMI8658) match the AMOLED-1.8, all on the same I2C bus.

Changes

  • firmware/src/boards/waveshare_lcd_183/ — new per-board folder (display, touch, power, imu, caps, board_init). Display uses Arduino_ESP32SPI + Arduino_ST7789; brightness maps onto an LEDC PWM backlight. Pins taken from Waveshare's official demo (waveshareteam/ESP32-S3-Touch-LCD-1.83).
  • firmware/platformio.ini[env:waveshare_lcd_183].
  • firmware/src/ui.cpp — adds a third compute_layout() breakpoint for small 240×284 screens (smaller fonts + shrunk logo) and makes the usage-screen fonts responsive (the Bluetooth screen already worked this way). The two existing boards (480×480, 368×448) render identically — they keep their current font choices.
  • tools/shot_png.py — small ffmpeg-free framebuffer→PNG capture helper (complements screenshot.sh).
  • docs/porting/adding-a-board.md — note that 4-wire SPI TFT panels are supported, with this board as the reference.

Testing

Built and flashed on real hardware (pio run -e waveshare_lcd_183). Boot is clean (display, CST816 touch, AXP2101, QMI8658 all init), the splash and usage screens render correctly at 240×284, the daemon pairs over BLE and live usage shows. Note: row offset is 0 on this panel (Waveshare's demo uses 20, which left the top ~20 rows unwritten here).

🤖 Generated with Claude Code

florianalber and others added 2 commits June 16, 2026 14:51
New port for the 240x284 ESP32-S3-Touch-LCD-1.83. Unlike the existing
ports this panel is an ST7789P TFT driven over 4-wire SPI (not a QSPI
AMOLED) and has no XCA9554 IO expander: the LCD/touch reset lines are
plain GPIOs and the backlight is a PWM-dimmed LED string. Touch
(CST816D), PMU (AXP2101) and IMU (QMI8658) match the AMOLED-1.8.

- boards/waveshare_lcd_183/: display (Arduino_ESP32SPI + Arduino_ST7789,
  LEDC backlight), CST816 touch, AXP2101 power via PKEY, QMI8658 imu
  stub, caps, board_init. Pins from Waveshare's official demo.
- platformio.ini: [env:waveshare_lcd_183].
- ui.cpp: add a "tiny" 240x284 layout breakpoint and make the usage
  screen fonts/logo responsive. Existing boards render unchanged.
- tools/shot_png.py: ffmpeg-free framebuffer -> PNG capture helper.
- docs: note that 4-wire SPI TFT panels are now supported.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Personal customization on top of the LCD-1.83 board port (German labels,
opinionated layout — not intended for the upstream PR).

UI (ui.cpp, theme.h):
- Rebuilt the usage screen: header (logo + "Usage" wordmark + live clock),
  big SESSION % with a pace marker (elapsed share of the 5h window) and an
  "Ueber/Unter Tempo" verdict, a "LETZTE 7 TAGE" sparkline, a WEEKLY row
  (flex layout, equal gaps around the bar) and the status line.
- No battery icon: this SKU ships without a cell (has_battery=false in
  caps.cpp / board.h).

Fonts:
- Generated Tiempos 18 (wordmark), Mono 11 (small text) and Mono 15
  (status) from assets/ via lv_font_conv, incl. German glyphs (Ue/middot).

Data + protocol (data.h, main.cpp, daemon):
- UsageData gains clock[9] + day7[7]; parse_json reads "t" and "d7".
- Clock advances locally from a seconds-accurate host sync (HH:MM:SS) so it
  flips at the real minute boundary instead of lagging the 60s poll.
- Daemon sends "t" (HH:MM:SS) and "d7" (7-day token totals parsed from
  ~/.claude/projects/*.jsonl, normalized to the busiest day; index 6 = today).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Personal: redesigned usage screen (live clock + 7-day history)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant