Read out light sensor

This commit is contained in:
Admar Schoonen 2022-05-24 22:42:44 +02:00
parent ba7906ad9f
commit 6926d35baf
1 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,7 @@ static int AQI_LED = 0;
static int POLLEN_LED = 0;
static int IAQI_LED = 0;
static int CONNECT_SW_PIN = 0;
static int LIGHT_PIN = 0;
#define SHOW_AQI_LED
#define SHOW_POLLEN_LED
@ -267,6 +268,8 @@ static void setup_pins_proto_v1(void)
ledMapUVI = UVI_LED;
ledMapPollen = POLLEN_LED;
ledMapIAQI = IAQI_LED;
LIGHT_PIN = 34;
}
void leds_clear(void) {
@ -329,6 +332,9 @@ void readSensors(void) {
output += ", eCO2: " + String(iaqSensor.co2Equivalent);
output += " ppm, eVOC: " + String(iaqSensor.breathVocEquivalent);
output += " ppm";
int light = analogRead(LIGHT_PIN);
output += ", light: " + String(light);
Serial.println(output);
} else {
checkIaqSensorStatus();