Disabling intermentent blink

Every time my DIY kit rolls around to the CO2 values the builtin LED blinks. Normally this is fine but when the sensor is in a bedroom the LED is very bright!

It seems related to the CO2 sensor as I’ve disabled that sensor at

in the sketch and the blinking stops. If I turn that sensor on and turn off the other two the LED blinks nearly constantly.

I’ve poured through the library at arduino/AirGradient.cpp at master · airgradienthq/arduino · GitHub and can’t seem to find where the darn LED blink comes from.

Any help disabling it?

Ran into the same question while testing a few sensors with another Wemos d1 mini. Seems that the LED is connected to D4 as well. If a sensor or so is now also connected to D4 the LED will light up every time the sensor is read.
I was just testing sensors and simply switched to another pin and problem solved. But this won’t work here if you are using the PCB. Not sure if the LED can be turned off by software while still using D4, maybe someone else knows? There are a few code pieces around enabling/disabling the LED, so there might be hope… If not, you can always cover the LED or even remove it…

2 Likes

Dominic hit it right on the head. If pin D4 is active, the LED is on. I don’t think there is any software way to not use the LED and still use D4. Perhaps future revisions of the AirGradient board could consider using a different pin for the CO2 sensor. I was using a D1 Mini for a different project and ran into the same thing, so I chose to use a different one.

Some black electrical tape over the LED may be another solution.

1 Like

I was not aware of this and we will consider this in an update of the PCB. However, we also would like to keep things downwards compatible so it is a double-edged sword.

I think another solution might just be to clip off the LED from the board. I will try this later on my board here and report back if that works or creates any other issues.

Thanks for the great help everyone. I’ll just cover it with some tape for foreseeable future!