Skip to content

Latest commit

 

History

History

firmware

README.md

KB1 Firmware

Embedded firmware for the handcrafted PocketMidi KB1 MIDI controller, built with PlatformIO and Arduino for the Seeed XIAO ESP32-S3.

Capabilities

  • Scale, Chord (Block/Strum), and Arp keyboard modes.
  • Configurable lever, press, and capacitive touch controls.
  • Serial MIDI output, with BLE configuration and real-time CC control from the companion app.
  • Eight device preset slots and persistent settings.
  • Idle sleep, touch wake, and time-based battery tracking.

User Documentation

Use these maintained guides instead of a duplicate settings reference here:

Bluetooth must be enabled using the inward-lever hold gesture before pairing with the Configurator. Charging and calibration instructions are maintained in the guides above, not duplicated here.

Development Build

Install PlatformIO and run from this directory:

pio run --environment seeed_xiao_esp32s3
pio run --target upload --environment seeed_xiao_esp32s3
pio device monitor

PlatformIO uploads the appropriate components to their correct offsets. Edit platformio.ini for build or port settings.

Complete Release Images

Never distribute the app-only binary as a complete image. Flashing the app partition at offset 0x0 will not boot.

bash build_complete.sh

build_complete.sh builds and merges:

Component Offset
Bootloader 0x0
Partition table 0x8000
Application 0x10000

The script targets ESP32-S3 with DIO, 80 MHz, and 8 MB flash. Output is ../kb1-studio/dist/firmware/KB1-firmware-vX.Y.Z.bin.

For browser flashing, use KB1 Studio's Flash Tools on a desktop browser with Web Serial (Chrome, Edge, or Opera). Normal updates back up and restore NVS, preserving calibration, settings, and presets. Clear device data on update intentionally skips preservation.

For release coordination and hardware validation, see CONTRIBUTING.md.

Source Layout

BLE, touch, and all I2C work must remain on Core 1. Do not split the two GPIO expanders or input/LED I2C tasks across cores.

Historical Notes

These are development snapshots, not current setup instructions or verified current performance claims:

License

See the repository LICENSE.