================================================================
 PoseLab Core (lite) — Build & Output Guide
================================================================

Updated : 2026-08-31

This firmware is a minimal version that streams the 32 raw sensor
values as plain ASCII.

----------------------------------------------------------------
 Output format
----------------------------------------------------------------
- One line per frame (50 fps): 32 values, comma-separated, ending
  with a newline.
    0, 0, 2312, 154, 823, 0, 0, ..., 0
- Value = raw ADC reading with a noise cut applied (raw < 20 -> 0).
- Just read the serial port line by line and split on commas.
- The same line also goes out over BLE, so a browser (Web Bluetooth)
  can read it without a USB cable. The board advertises as
  "PoseLab Lite"; the notify characteristic carries one CSV line
  per notification. Nothing changes for USB users.

----------------------------------------------------------------
 Development environment setup
----------------------------------------------------------------
[1] Arduino IDE 2.x
    https://www.arduino.cc/en/software/#ide

[2] Board  --  Tools > Board > Boards Manager
    Search "esp32" > "esp32 by Espressif Systems"
    Choose "3.3.11" > click 'Update'

[3] Library  --  Tools > Manage Libraries
    Adafruit NeoPixel (v1.15.x)
    NimBLE-Arduino  (v2.x)      <- BLE output. Required to compile.

----------------------------------------------------------------
 Tools settings (use exactly these)
----------------------------------------------------------------
  Board            : ESP32S3 Dev Module
  Port             : (the board's COM port)
  USB CDC On Boot  : Disabled          <- Important. No data if Enabled
  Flash Mode       : QIO 80MHz
  Flash Size       : 16MB (128Mb)
  PSRAM            : OPI PSRAM
  Partition Scheme : Custom             <- applies the partitions.csv we provided
  Upload Speed     : 921600

* See tool-menu-ok-memo.png in this folder. It is a screenshot of the
  actual Arduino IDE Tools menu; the five entries highlighted in yellow
  (USB CDC On Boot / Flash Mode / Flash Size / Partition Scheme / PSRAM)
  are the ones that must match the values above.

----------------------------------------------------------------
 Upload & verify
----------------------------------------------------------------
- Open the sketch PoseLabCore-lite-pre.0.2.ino and upload it.
  (board.h and sensor_scan.h sit flat next to the .ino, with no src/
   folder, so they all appear as tabs in the IDE.)
- Set Serial Monitor baud to 2,000,000.
- It is working correctly once the boot banner
  "==== PoseLab Core (lite) ====" appears and CSV lines start streaming.
- On boot the LED runs a rainbow sequence, then stays amber.

----------------------------------------------------------------
 Support
----------------------------------------------------------------
- support@poselab.app
