Commit Graph

25 Commits

Author SHA1 Message Date
ash 268b793d87 Fix compilation: remove unused flash_sysex/flash_all/flash_one methods and member vars 2026-06-25 23:54:30 +00:00
ash a281eaa46e Clean up LED driver + rename USB to JOC Midi
- Removed flash_sysex/flash_all/flash_one (conflicted with heartbeat)
- Simplified flash_activity: LED 0 white 50ms, restores properly
- Heartbeat only on LED 9 when no activity
- USB renamed: Manufacturer=JOC, Product=JOC Midi
2026-06-25 23:47:39 +00:00
ash c20f1dec2c Add visual MIDI type indicators
- SysEx: ALL LEDs flash white 200ms
- Note: LED 0 flashes red 100ms
- CC: LED 1 flashes green 100ms
- Helps diagnose what MIDI arrives without serial
2026-06-25 22:39:37 +00:00
ash 1676bbb044 Fix LED flash/restore logic, heartbeat only on LED 9
- flash_activity: only LED 0, restores properly
- flash_sysex: saves ALL LED states, restores all properly
- heartbeat: only LED 9, only when no activity flash active
- Added sysex_saved arrays to track all LED states
2026-06-25 07:48:05 +00:00
ash 0d738a6e5e Fix compilation: add flash_sysex to interface + remove conflicting build flags 2026-06-25 07:40:10 +00:00
ash 399c4341ed Add VID/PID to build flags for ESP32 core + stronger visual indicators
- Set USB VID/PID via ESP32 core build flags (may work better than TinyUSB API)
- Heartbeat on LED 9 (amber pulse every 2s) confirms device is alive
- SysEx flashes ALL LEDs white for 200ms
- Regular MIDI flashes LED 0 white for 50ms
2026-06-25 07:33:12 +00:00
ash b5bbe24977 Add SysEx handling for Launchpad X Programmer mode
- Parse all SysEx CIN types (start, continue, end)
- Reassemble multi-packet SysEx messages
- Handle layout select (Programmer mode = 0x7F)
- Handle Programmer/Live mode switch
2026-06-25 07:20:47 +00:00
ash 500720dadf Add visual MIDI activity indicator
Flash LED 0 white for 30ms on any MIDI input.
Visible without serial - helps diagnose whether MIDI
is arriving when connected to iPad with Loopy Pro.
2026-06-25 06:43:00 +00:00
ash 4f6ff39af4 Add run_palette_test() declaration to header 2026-06-24 06:32:57 +00:00
ash 0e5cbeb73d Clean up: remove boot layout test (Launchpad X mapping confirmed working) 2026-06-24 05:47:09 +00:00
ash 5df74b28e2 Add run_layout_test() declaration to header 2026-06-24 05:32:49 +00:00
ash 6c64c91e55 Add miditest and mapping commands for LED layout debugging 2026-06-24 03:56:30 +00:00
ash bd20d1938b Fix duplicate set_led_state, add set_led_brightness to interface 2026-06-24 01:28:56 +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 8d585e9c40 Fix RMT crash: use FASTLED_USES_ESP32S3_I2S to avoid broken RMT. Remove rmtled. 2026-06-23 22:29:25 +00:00
ash bec8025f0a Add rawled bit-bang command, restore FastLED 2026-06-23 14:39:46 +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 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 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 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 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 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