How to disable on board LED without physically removing it

Good Day!
I am working on a small project with a D1 mini and Blynk Edgent. I am trying to save power as much as possible and have been trying to remove the LED strobe effect in the Blynk Edgent Sketch, but when I do so, I keep getting an error saying " was not declared in this scope",etc.
Is there an easy way to do this without going through each β€˜.h’ Tab, removing the LED bits?

I really want to avoid removing the LED physically as this project isnt a long term one.
Thanks in advance!

I’d suggest that you keep everything as it is, you don’t simply go to a file and delete or comment out a line of code.

Look in Indicator.h and work out what pulses the LED when it’s in normal run mode, and change the code.
However, I’d keep the rapid pulsing when in provisioning mode if I were you.

Pete.

1 Like
  void initLED() {
    //pinMode(BOARD_LED_PIN, OUTPUT);
  }

  void setLED(uint32_t color) {
    #if BOARD_LED_INVERSE
    //analogWrite(BOARD_LED_PIN, TO_PWM(255 - color));
    #else
    //analogWrite(BOARD_LED_PIN, TO_PWM(color));
    #endif
  }

I commented out β€œ//analogWrite(BOARD_LED_PIN, TO_PWM(255 - color));” , β€œ//analogWrite(BOARD_LED_PIN, TO_PWM(color));”" and β€œ//pinMode(BOARD_LED_PIN, OUTPUT);”

And the LED no longer functions which is what I want.
Thank you

1 Like