isnan, korekta pinów
This commit is contained in:
BIN
ESP32/TempHumLoggerHomeKit/Analiza okapu.xlsx
Normal file
BIN
ESP32/TempHumLoggerHomeKit/Analiza okapu.xlsx
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,7 +9,7 @@
|
||||
#include "SD.h"
|
||||
#include "SPI.h"
|
||||
|
||||
#define Version "0.44"
|
||||
#define Version "0.45"
|
||||
#define WIRE Wire
|
||||
#define DHTTYPE DHT22
|
||||
#define DHTPIN 4 //GPIO04 D4
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#define FAN_PIN 14 //GPIO36 D14
|
||||
#define DHTPIN_L 13 //GPIO36 D13
|
||||
#define DHTPIN_M 16 //GPIO36 D17
|
||||
#define DHTPIN_H 17 //GPIO36 D16
|
||||
#define DHTPIN_M 17 //GPIO36 D17
|
||||
#define DHTPIN_H 16 //GPIO36 D16
|
||||
|
||||
|
||||
|
||||
@@ -339,12 +339,18 @@ void loop() {
|
||||
|
||||
temp = dht.readTemperature();
|
||||
tempH = (dhtH.readTemperature()-0.16); //kalibracja
|
||||
if (isnan(tempH)) { tempH = lastTempH;}
|
||||
tempM = (dhtM.readTemperature()+0.08); //kalibracja
|
||||
if (isnan(tempH)) { tempM = lastTempM;}
|
||||
tempL = (dhtL.readTemperature()+0.0);
|
||||
if (isnan(tempL)) { tempL = lastTempL;}
|
||||
hum = dht.readHumidity();
|
||||
humH = (dhtH.readHumidity()+0.0);
|
||||
if (isnan(humH)) { humH = lastHumH;}
|
||||
humM = (dhtM.readHumidity()-3.2); //kalibracja
|
||||
if (isnan(humM)) { humM = lastHumM;}
|
||||
humL = (dhtL.readHumidity()+1.7); //kalibracja
|
||||
if (isnan(humL)) { humL = lastHumL;}
|
||||
|
||||
|
||||
// Compute heat index in Celsius (isFahreheit = false)
|
||||
|
||||
Reference in New Issue
Block a user