diff --git a/include/pixel_stomp_mux.h b/include/pixel_stomp_mux.h index 1959f26..63ca6d2 100644 --- a/include/pixel_stomp_mux.h +++ b/include/pixel_stomp_mux.h @@ -1,5 +1,6 @@ #pragma once +#define FASTLED_USES_ESP32S3_I2S #include #include diff --git a/src/led_stub.cpp b/src/led_stub.cpp index 6efdb65..ef46eff 100644 --- a/src/led_stub.cpp +++ b/src/led_stub.cpp @@ -19,7 +19,7 @@ void DefaultLedStub::set_mux(PixelStompMux* mux) { } void DefaultLedStub::begin() { - Serial.println("[LED] Using WS2812C via PixelStomp MUX (NeoPixel)"); + Serial.println("[LED] Using WS2812C via PixelStomp MUX (FastLED I2S)"); initialized = true; if (!mux_ptr) { diff --git a/src/main.cpp b/src/main.cpp index 006bf2d..08bc0a6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,6 @@ #include #include -#include #include #include "midi_transport.h" #include "pixel_stomp_mux.h" @@ -125,7 +124,6 @@ void handle_serial_command(const String& cmd) { Serial.println(" pixel0/pixel1 - single pixel test"); Serial.println(" gpiotest - raw GPIO pin diagnostic"); Serial.println(" rawled - bit-bang WS2812 (no library)"); - Serial.println(" rmtled - RMT WS2812 direct (ESP-IDF)"); Serial.println(" anim - re-run startup animation from loop"); } else if (cmd == "anim") { Serial.println("[CMD] Running animation..."); @@ -141,55 +139,6 @@ void handle_serial_command(const String& cmd) { } mux.clear_all(); Serial.println("[CMD] Animation done"); - } else if (cmd == "rmtled") { - Serial.println("[CMD] RMT WS2812: pixel 0 = RED on GPIO 9"); - uint8_t pin = 9; - uint8_t grb[] = {0x00, 0xFF, 0x00}; - rmt_channel_t ch = RMT_CHANNEL_0; - - rmt_config_t cfg = { - .rmt_mode = RMT_MODE_TX, - .channel = ch, - .gpio_num = (gpio_num_t)pin, - .clk_div = 8, - .mem_block_num = 1, - .flags = 0, - .tx_config = { - .carrier_freq_hz = 38000, - .carrier_level = RMT_CARRIER_LEVEL_HIGH, - .idle_level = RMT_IDLE_LEVEL_LOW, - .carrier_duty_percent = 33, - .carrier_en = false, - .loop_en = false, - .idle_output_en = true, - } - }; - rmt_config(&cfg); - rmt_driver_install(ch, 0, 0); - - rmt_item32_t items[25]; - int idx = 0; - for (int b = 0; b < 3; b++) { - for (int bit = 7; bit >= 0; bit--) { - if (grb[b] & (1 << bit)) { - items[idx].level0 = 1; items[idx].duration0 = 10; - items[idx].level1 = 0; items[idx].duration1 = 10; - } else { - items[idx].level0 = 1; items[idx].duration0 = 4; - items[idx].level1 = 0; items[idx].duration1 = 12; - } - idx++; - } - } - items[idx].level0 = 0; items[idx].duration0 = 500; - items[idx].level1 = 0; items[idx].duration1 = 0; - idx++; - - rmt_write_items(ch, items, idx, 1); - rmt_driver_uninstall(ch); - Serial.println("[CMD] RMT done. Wait 2 sec..."); - delay(2000); - Serial.println("[CMD] Done"); } else if (cmd == "rawled") { uint8_t pin = 9; Serial.println("[CMD] Bit-bang WS2812: pixel 0 = RED on GPIO 9");