Skip to content

Firebrat v0.1.0

Choose a tag to compare

@deftio deftio released this 27 Nov 22:33
· 6 commits to main since this release
Immutable release. Only release title and notes can be modified.

First release: a thermal camera built from a LilyGO T-Display-S3 and an MLX90640, viewable on its own screen,
in a browser over WiFi, or from the website over USB or Bluetooth, with no app to install. The code, tests and
docs were written with Claude Code; the design decisions, hardware testing, review and release are the
maintainer's.

Camera

  • Live MLX90640 view on the T-Display-S3 LCD: 7x upscale, five palettes (iron, rainbow, gray, hot, arctic),
    auto or held range, max / center / min readouts.
  • Up to 16 full frames per second (the default). The screen and browsers update only on complete frames, never
    on half-frames. Measured on the board: 15.7 fps with 0 read errors; 8 and 16 fps run I2C at 1 MHz.
  • Interpolation: nearest, bilinear and bicubic (Catmull-Rom, the default), the same on the LCD and in the
    browser.
  • Denoise, on by default:
    • removes the MLX90640's chess-pattern offset
    • motion-adaptive temporal filter, tuned per frame rate
    • spatial median: off, cross (the default) or 3x3
      At 16 fps on a still scene, the defaults bring speckle from 0.87 to 0.16 °C.
  • Auto-detects which connector the sensor is on (18/17, 43/44, or 8/9 on generic boards). Recovers the I2C bus
    and retries at boot, so the sensor is found after a reset in the middle of a transfer.
  • Three builds: t-display-s3 (screen), t-display-s3-headless, and esp32s3-headless (any ESP32-S3).
  • status reports frame timing, read errors, LCD render and push times, and live noise figures.

Web UI

  • Served from flash and driven entirely from the camera over bitwrench.js's bwserve protocol (SSE). The page
    is a thin bootstrap; the camera composes the UI and pushes updates as JSON.
  • Controls, synced with the LCD and buttons:
    • palette, interpolation, frame rate, range and flip
    • an Image quality card: temporal denoise (auto, or manual Blend and Motion sliders), chess fix and median,
      with live Change/frame and Speckle readouts
  • Hover temperatures.
  • Snapshots and recordings:
    • Snapshot: a PNG with the scale and readouts
    • CSV of one frame
    • Record video: WebM or MP4
    • Record data: raw frames as firebrat-frames JSON
  • Dark by default (it's a heat camera); light is one click.

Connections

  • WiFi with mDNS (firebrat.local).
  • USB: stream on sends the web UI over the serial port, and docs/camera.html shows it with Web Serial, so
    no WiFi is needed. 15.8 fps with no skipped frames.
  • Bluetooth live view: the camera streams its UI over BLE notifications (compact 8-bit frames, up to about
    15 fps, ~17 KB/s). The camera is always discoverable.
  • Bluetooth WiFi setup from docs/setup.html (Web Bluetooth on GitHub Pages). Credential writes are accepted
    only during a setup window.
  • Each stream runs in its own task (USB on core 1, Bluetooth and WiFi on core 0), so a slow viewer on one
    link can't make another skip frames. With USB and Bluetooth at once: 15.2 and 15.1 fps.

Console and host tools

  • Console on xelp 0.3.5: one command table, two instances, USB serial and
    Bluetooth (Nordic UART Service; works with any BLE terminal app). Line editing, history, generated help,
    quoted arguments. Over Bluetooth, commands that could lock the owner out need the setup window.
  • Commands for WiFi, name, palette, interpolation, denoise, rate, range, flip, I2C pins and diagnostics;
    snap prints a frame as SNAP:{json}.
  • tools/firebrat.py (host CLI): snap, record, render, cmd, ports. Writes PNG, CSV and JSON on
    the computer with the camera's own palettes and interpolation; records at 15.9 fps over USB with no dropped
    frames.
  • tools/mock_device.js replays captured device messages, so the web UI can be worked on without hardware.

Website (GitHub Pages)

  • docs/, no build step: hand-written HTML with the text in the markup, styled by bitwrench.js
    (CSS as JS data). Thin top bar and compact layout like the other deftio project sites; dark by default.
  • Pages: home (with a live demo that replays real frames, plus interpolation and palette comparisons),
    camera (USB or Bluetooth), WiFi setup, docs, and a 404 page.
  • The Docs page renders README.md with quikdown.js 1.3.3, so the README is the single source of truth.
  • SEO on every page: description, canonical URL, Open Graph, Twitter and JSON-LD. Also a sitemap, web
    manifest, llms.txt and .nojekyll.
  • Firebrat logo: a small cartoon firebrat in the heat palette. Its legs, antennae and tail are orange with a
    dark edge rather than a white outline, so it stays crisp as a 16 px favicon on light or dark backgrounds.

Tests and project

  • Native C++ unit tests (Unity) for the pure imaging core src/imaging.cpp.
  • node:test suites (no npm packages) for:
    • the frame painter
    • the protocol, against a real device capture
    • the website's pages
    • cross-file consistency: palettes, names, Bluetooth UUIDs, element ids and the version
  • Python tests for tools/firebrat.py, and a hardware smoke test (make test-hw) for a camera on USB.
  • CI on GitHub Actions (pinned by SHA) runs the host tests and all three builds; Dependabot updates the Actions.
  • SECURITY.md (threat model), PRIVACY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, issue and PR templates,
    AGENTS.md and llms.txt.

Dependencies

  • Vendored: bitwrench 2.1.16 (embedded headers and browser bundle), quikdown 1.3.3, and Adafruit MLX90640
    1.1.1 with its manifest trimmed to depend on Adafruit BusIO only.
  • Fetched by PlatformIO, pinned: LovyanGFX 1.2.7, ESPAsyncWebServer 3.7.7 and AsyncTCP 3.4.0 (both
    LGPL-3.0), xelp 0.3.5.

Contributors

  • M. A. Chatterjee (@deftio): design, hardware, testing, review and release.
  • Claude (Anthropic), working in Claude Code: wrote most of the firmware, the web UI, the website, the tools,
    the tests and the docs, under the maintainer's direction.

Full history: CHANGELOG.md. Flashing and setup: README and the website.

Firmware download

firebrat-v0.1.0-t-display-s3.bin is a merged image (bootloader, partitions and app) for the LilyGO
T-Display-S3 (16 MB flash). Flash it at offset 0:

esptool.py --chip esp32s3 write_flash 0x0 firebrat-v0.1.0-t-display-s3.bin

Check it against firebrat-v0.1.0-t-display-s3.bin.sha256. For the headless builds or other ESP32-S3 boards,
build from source with PlatformIO (see the README). The image includes ESPAsyncWebServer and AsyncTCP, which
are LGPL-3.0; their source and this project's full source are public, so the binary can be relinked.