Commit Graph

20 Commits

Author SHA1 Message Date
ash bec8025f0a Add rawled bit-bang command, restore FastLED 2026-06-23 14:39:46 +00:00
ash 6c678ce18a Add raw GPIO test command to diagnose pin connectivity 2026-06-23 14:35:15 +00:00
ash 5f2ad9ef91 Switch from FastLED to Adafruit NeoPixel (more reliable on ESP32-S3 RMT) 2026-06-23 14:32:19 +00:00
ash 2931571880 Fix WS2812 color order to GRB (matching BMC) 2026-06-23 14:26:27 +00:00
ash 30b56a0b4c Match BMC protocol: 5µs delays, read DI before CLK, WS2812+RGB, power limit 2026-06-23 14:08:43 +00:00
ash 0db36a0129 Better MUX probe: 5 rounds, CLK before/after DI reads, single LED test 2026-06-23 14:01:51 +00:00
ash 5de4de4f1a Switch from NeoPixel to FastLED for ESP32-S3 LED reliability
FastLED has better ESP32 support and handles timing/RMT properly.
- Use CRGB array instead of Adafruit_NeoPixel
- FastLED.show() is more reliable on ESP32-S3
- probe command now tests all LEDs at max brightness
2026-06-23 13:56:05 +00:00
ash 76dec0d359 Fix 74HC165 protocol: match RoxMux library polarity
Key difference from RoxMux (the library designed for this hardware):
- LD pin starts HIGH, pulses LOW->HIGH to latch (was inverted)
- Data pin is INPUT (not INPUT_PULLUP) - 10k pullups on MUX board
- bitWrite instead of manual bit shifting
2026-06-23 13:51:21 +00:00
ash 70097057fb Add hardware probe and single-pixel test commands
- probe: toggles LD/CLK, reads DI state at each step, tests single pixel
- pixel0/pixel1: single pixel at max brightness for testing
- Increased LD pulse timing to 20us
- Increased CLK timing to 2us
- NeoPixel brightness raised to 80
2026-06-23 13:45:37 +00:00
ash 07e5cd8994 Rewrite MUX: WS2812C LEDs (NeoPixel) + 74HC165 buttons
PixelStomp MUX uses:
- WS2812C LEDs: one data line via DAT (GPIO 9), NeoPixel protocol
- 74HC165 shift register: LD/CLK/DI for reading 8 button states

Changes:
- Use Adafruit NeoPixel library for LED control
- Proper 74HC165 parallel-load shift-in for buttons
- 8 switches + 8 LEDs (was incorrectly 10)
- Diagnostic commands: dump, ledtest, red, green, blue, read
2026-06-23 13:38:51 +00:00
ash 2dfd016b76 Add MUX diagnostic commands and GPIO probe
Serial commands:
- dump: show button and LED state
- ledon/ledoff: toggle all LEDs
- ledtest: sequential LED test
- read: raw button read
- probe: check pin states and test LD toggle
2026-06-23 13:33:00 +00:00
ash 102cae9d91 Add PixelStomp MUX driver (DAT=9, LD=10, CLK=11, DI=12)
- New PixelStompMux class with shift register read/write
- Read 10 buttons via DI (active LOW)
- Drive 10 LEDs via DAT (shift out + latch)
- LED startup animation uses MUX
- Switch polling reads from MUX shift register
- MUX instance shared between switch and LED drivers
2026-06-23 13:27:24 +00:00
ash c94be67384 Fix for ESP32-S3-WROOM-1: safe GPIO pins, serial flush, delays
- Switch pins: 2-7, 15-18 (avoids USB 19/20, PSRAM 26-32, JTAG 34-37)
- LED pins: 38-42, 45-48, 21 (high GPIOs, no special functions)
- Add Serial.flush() after init messages
- Increase startup delays for reliable serial output
- Board: esp32-s3-devkitc-1-n16r8
2026-06-23 13:22:49 +00:00
ash bb32ec65d1 Fix USB MIDI, add GPIO for switches and LEDs
- Remove TinyUSBDevice.begin() conflict with Arduino core
- Switch stub now reads GPIO with debounce (pins 1-10)
- LED stub now drives GPIO pins (pins 11-20) with startup animation
- All pins printed to console on init
2026-06-23 13:18:20 +00:00
ash 22572b9baa Fix Adafruit TinyUSB API: TinyUSBDevice, writePacket, mounted() 2026-06-23 13:12:32 +00:00
ash 987288fd41 Fix USB MIDI: use Adafruit TinyUSB Library for proper MIDI support
- Add Adafruit TinyUSB Library dependency
- Create tusb_config.h enabling MIDI class
- USB device named 'Loopy Foot Controller'
- is_connected() check before sending
2026-06-23 13:10:25 +00:00
ash 4d81386f78 Fix USB MIDI, add LED startup animation, improve logging
- Use ArduinoUSBMIDI library for proper USB MIDI device recognition
- Add LED startup colour cycle (red, green, blue, yellow, magenta, cyan, white)
- Add comprehensive console logging for all MIDI in/out and switch events
- Log unmapped MIDI messages
2026-06-23 13:06:57 +00:00
ash c1b163c8b8 Fix MIDI transport: use TinyUSB directly instead of non-existent USBMIDI.h 2026-06-23 13:00:39 +00:00
ash ad7495dc1c Move all source files to src/ to fix LDF linking 2026-06-23 12:57:54 +00:00
ash 9078001404 Convert to PlatformIO/Arduino format
- Replace ESP-IDF structure with PlatformIO (platformio.ini)
- Move source files to src/ and include/
- Move libraries to lib/ directory
- Replace FreeRTOS with Arduino task/vTaskDelay
- Use Arduino MIDI library instead of raw TinyUSB
- Dual-core: MIDI on core 0, controller on core 1
2026-06-23 12:55:12 +00:00