Closed AWSW-de closed 3 years ago
On some boards the LED pin is used by the SPI bus usually CS and after the screen is used the CS line is low leading to the LED being on. In the 7.5β version there is this code to switch it off:
pinMode(BUILTIN_LED, INPUT); // If it's On, turn it off and some boards use GPIO-5 for SPI-SS, which remains low after screen use digitalWrite(BUILTIN_LED, HIGH);
But if the correct board is not selected or a different one then the LED pin is not switched OFF (on usually!) itβs a question of finding out what pin your board uses for the LED and then whether it needs to be high or low to turn it off. Then add a line to set the pin accordingly just before sleep. This works but has always confused me as when the ESP32 enters sleep it releases all the GPIO pins to a high impedance state, well thatβs what the data sheet says, but in reality it doesnβt and they continue to operate. I believe it is connected with setting the pins to sleep mode too which is possible when the NVRAM is still active.
Thanks π You are right. I just took 2 new Lolin D32 boards and they do not show this behaviour. Strange, because i used the same wiring and the came in the same delivery... Thanks again and stay safe. π
There the LED and non-LED boards they supply, I've never really found out what the difference is, but this could be it. Best regards and yes do stay safe
Hello,
I just noticed that the blue LED of the Lolin D32 stays on after update of 4.2β display sketch.
I could not see this behaviour with the usually from me used 7.5β displays also using Lolin D32 boards.
I already played around with the build-in-led section without success.
Maybe you have a hint for me to save some more power of the battery by turning the led off while the ESP32 is in deep sleep mode.
Thanks in advance. π