ESP32 + Pi Hub

Field notes and commands for the ESP32-2432S024N Witching Hour control stack (Wi-Fi, BLE, USB, addressable LEDs, I2S audio, and Pi hub).


ESP32 Flash + Monitor

cd /home/fletchervaughn/code/witching-hour/iot/esp32-2432s024n
pio run -t upload
pio device monitor -b 115200

You should see:

IP: 192.168.x.x

Wi-Fi HTTP Control

Replace `ESP_IP` with the IP from serial.

curl -X POST "http://ESP_IP/light?on=1&brightness=140&r=80&g=30&b=10"
curl -X POST "http://ESP_IP/scene?name=gallery"
curl -X POST "http://ESP_IP/audio?title=Witching%20Hour%20Session%2001"

Animations map to scenes:

gallery -> swirl
vault -> sparkle
studio -> pulse
anything else -> steady

Pi Hub Control Panel

Edit the device list:

/home/fletchervaughn/code/witching-hour/iot/pi-hub/devices.json

Run the hub:

cd /home/fletchervaughn/code/witching-hour/iot/pi-hub
. .venv/bin/activate
python server.py

Open:

http://PI_IP:8088/

BLE scan (Pi only):

pip install bleak
curl http://PI_IP:8088/ble/scan

BLE Commands

LIGHT 1 120 120 40 10
SCENE gallery
AUDIO Witching Hour Session 01
ANIM swirl

USB Serial Commands

LIGHT 1 120 120 40 10
SCENE gallery
AUDIO Witching Hour Session 01
ANIM pulse

Audio Stream

The ESP32 accepts raw 16-bit mono PCM at 22.05kHz on `/audio-stream`.

Why The Screen Is Black

The display is not initialized yet. We need the driver chip used by your board (often ILI9341 or ST7789). We added a driver toggle in `include/config.h`. Flip between `WHM_TFT_DRIVER_ILI9341` and `WHM_TFT_DRIVER_ST7789` until the screen lights up.

We draw a simple sigil placeholder right now. If you want the real WHM sigil on the ESP32 screen, export a 240x240 monochrome PNG and I will embed it as a bitmap.

Notes

Hardware reference from you: "sparkle iot xh 32s wifi bt n4xx". We are assuming the ESP32-2432S024N board for now.