diff --git a/platformio.ini b/platformio.ini index 2e93f19..6fd0e2a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -46,6 +46,7 @@ board_build.f_cpu = 80000000L board = dfrobot_beetle_esp32c3 platform = espressif32 framework = arduino +; board_build.f_cpu = 80000000L monitor_speed = 460800 lib_deps = fastled/FastLED@^3.7.0 diff --git a/src/Controls.cpp b/src/Controls.cpp index 096bb42..78774e7 100644 --- a/src/Controls.cpp +++ b/src/Controls.cpp @@ -41,10 +41,13 @@ void Controls_loop(void *pvParameters){ while(true){ for(uint8_t a=0; a 3072; + auto currentValueAnalog = analogRead(pin); + auto currentValue = currentValueAnalog > 3072; auto prevValue = prevState[a]; - // Serial.printf("Pin %d: %d->%d\n", pin, prevValue, currentValue); + if(CONTROLS_DEBUG){ + Serial.printf("Pin %d: %d->%d (%d)\n", pin, prevValue, currentValue, currentValueAnalog); + } // if(abs(currentValue - prevValue) > 100){ if(currentValue != prevValue){ diff --git a/src/Hanglamp.cpp b/src/Hanglamp.cpp index 9213e99..7abf699 100644 --- a/src/Hanglamp.cpp +++ b/src/Hanglamp.cpp @@ -170,6 +170,10 @@ void controlsCallback(ControlEvent event){ } #endif +#ifdef ENABLE_LED + +#endif + void setup() { diff --git a/src/Led.h b/src/Led.h index 37a80bb..35e1b72 100644 --- a/src/Led.h +++ b/src/Led.h @@ -20,8 +20,8 @@ #include #endif -#define PIN_STRIP1 8 -#define PIN_STRIP2 9 +#define PIN_STRIP1 5 +#define PIN_STRIP2 6 #define STRIP_LENGTH 46