panel light is working

This commit is contained in:
Roald Batts 2023-01-26 18:30:22 -05:00
parent 3e800795d6
commit 8a69770dbd

View file

@ -34,10 +34,16 @@ void setup()
dht.begin(20);
Serial.print("done setting up!\n");
//Intialize the 12C bus
Wire.begin();
//On esp8266 you can select SCL and SDA pins using Wire.begin
//For Wemos /Lolin D1 Mini Pro and the Ambient Light shield use
Wire.begin();
lightMeter.begin();
Serial.println(F("BH1750 Test begin"));
}
void loop()// the loop function runs over and over again forever
{
void loop(){
//Serial.print("[");
//Serial.print(count);
//Serial.print("] hey\n");
@ -50,17 +56,19 @@ void loop()// the loop function runs over and over again forever
digitalWrite(LED, LOW);
}
float hum;
float temp;
temp = dht.readTemperature();
hum = dht.readHumidity();
float lux = lightMeter.readLightLevel();
float hum = dht.readTemperature();
float temp = dht.readHumidity();
{
Serial.print("humidity: ");
Serial.print("hum: ");
Serial.print(hum);
Serial.print(" temperature: ");
Serial.print(" temp: ");
Serial.print(dht.convertCtoF(temp));
Serial.print(" L1 light: ");
Serial.println(lightReadL1);
Serial.print(" L1: ");
Serial.print(lightReadL1);
Serial.print(" PanL: ");
Serial.print(lux);
Serial.println("lx");
delay(50);
}