Commit Graph

38 Commits

Author SHA1 Message Date
ash dbb66e1e77 Fix duplicate TinyUSB symbols: add lib_archive=no (prevents Adafruit library archiving, changes link order so local .o defines symbols before libarduino_tinyusb.a) 2026-06-23 23:14:51 +00:00
ash cdfac43bfe Fix usb command: remove non-existent getter methods, use only mounted() and ready() 2026-06-23 23:13:28 +00:00
ash c737849a96 Fix build: add Adafruit_TinyUSB.h include in main.cpp, add build_unflags to prevent ARDUINO_USB_MODE redefinition warning 2026-06-23 23:12:42 +00:00
ash a3e86d0ddf Fix USB MIDI enumeration: switch from ARDUINO_USB_MODE=1 to 0 (matches working Adafruit TinyUSB example), add explicit TinyUSBDevice.begin(0) and detach/attach re-enumeration, remove conflicting tusb_config.h 2026-06-23 23:10:20 +00:00
ash d957e276bd Fix daisy-chain MUX byte order: MUX1 (first 8 bits) → low byte/switches 0-7, MUX2 → high byte/switches 8-15 2026-06-23 22:49:59 +00:00
ash 9a56591453 Fix NUM_LEDS=10, NUM_BUTTONS=16 for 2 daisy-chained MUX boards. Fix pixel7 stuck blue (was only sending 8 LED data to 10-LED chain) 2026-06-23 22:43:53 +00:00
ash be36ba9bf4 Remove broken I2S define, revert to default RMT + correct pin 12 2026-06-23 22:37:03 +00:00
ash 2b689f3b18 Move FASTLED_USES_ESP32S3_I2S to build_flags so FastLED .cpp files compile with it 2026-06-23 22:32:31 +00:00
ash cc6cc2fa32 FIX SWAPPED PINS: GPIO 9 is 74HC165 data, GPIO 12 is WS2812C data. Product docs: DAT/LD/CLK = 74HC165, + WS2812C data. 2026-06-23 22:31:08 +00:00
ash 8d585e9c40 Fix RMT crash: use FASTLED_USES_ESP32S3_I2S to avoid broken RMT. Remove rmtled. 2026-06-23 22:29:25 +00:00
ash 6274ff4182 Add rmtled: direct RMT WS2812 driver via ESP-IDF API 2026-06-23 22:26:04 +00:00
ash 835e30b8b1 Add anim command to run FastLED animation from loop() 2026-06-23 22:24:28 +00:00
ash 943e9c02a4 Add gpio.h and esp_rom_sys.h includes for rawled 2026-06-23 14:48:15 +00:00
ash 715aca3365 Fix rawled: GRB RED={0x00,0xFF,0x00}, differentiate 0/1 bit timing 2026-06-23 14:47:48 +00:00
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 81cd2b41fd Remove fixed monitor_port, let PlatformIO auto-detect 2026-06-23 13:30:06 +00:00
ash f51df7e660 Fix board ID back to esp32-s3-devkitc-1 2026-06-23 13:28:32 +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
ash 458cb5060f Fix Phase 1 skeleton: add build system, fix compilation errors
- Add CMakeLists.txt for project and all components
- Add idf_component.yml with TinyUSB dependency
- Create switch_stub.cpp implementation
- Fix app_task.h to match .cpp implementation (2-param signature)
- Fix led_stub.h/cpp class naming (DefaultLedStub)
- Fix midi_transport.cpp TinyUSB API usage (tud_midi_*)
- Move main.cpp to main/ directory
- Add sdkconfig.defaults for ESP32-S3
2026-06-23 08:59:53 +00:00
ash db4b63c755 Initial commit: Phase 1 skeleton 2026-06-23 08:55:42 +00:00