how to turn off all leds on LC-Relay-ESP01-2R-5V to safe energy?
- User
how to turn off all leds on LC-Relay-ESP01-2R-5V to safe energy?
Assistant
To turn off all LEDs on the LC-Relay-ESP01-2R-5V to save energy, you'll need to modify the firmware. The power LED is typically hardwired to the power supply, but the relay status LEDs can be disabled in code.
Here's a simple Arduino sketch example that would disable the relay indicator LEDs:
cpp#include <ESP8266WiFi.h> // Define relay pins const int relay1Pin = 0; // GPIO0 const int relay2Pin = 2; // GPIO2 void setup() { // Initialize relay pins as outputs pinMode(relay1Pin, OUTPUT); pinMode(relay2Pin, OUTPUT); // Turn off relays (and their LEDs) digitalWrite(relay1Pin, LOW); digitalWrite(relay2Pin, LOW); // Disable WiFi to save more power WiFi.mode(WIFI_OFF); WiFi.forceSleepBegin(); } void loop() { // Your main code here // Keep relays off unless needed }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.