panel light is working
This commit is contained in:
parent
3e800795d6
commit
8a69770dbd
1 changed files with 18 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue