isnan, korekta pinów

This commit is contained in:
sieja
2025-03-03 13:20:48 +01:00
parent 64eb3c9f82
commit b31a253192
4 changed files with 9 additions and 3 deletions

Binary file not shown.

View File

@@ -9,7 +9,7 @@
#include "SD.h" #include "SD.h"
#include "SPI.h" #include "SPI.h"
#define Version "0.44" #define Version "0.45"
#define WIRE Wire #define WIRE Wire
#define DHTTYPE DHT22 #define DHTTYPE DHT22
#define DHTPIN 4 //GPIO04 D4 #define DHTPIN 4 //GPIO04 D4
@@ -22,8 +22,8 @@
#define FAN_PIN 14 //GPIO36 D14 #define FAN_PIN 14 //GPIO36 D14
#define DHTPIN_L 13 //GPIO36 D13 #define DHTPIN_L 13 //GPIO36 D13
#define DHTPIN_M 16 //GPIO36 D17 #define DHTPIN_M 17 //GPIO36 D17
#define DHTPIN_H 17 //GPIO36 D16 #define DHTPIN_H 16 //GPIO36 D16
@@ -339,12 +339,18 @@ void loop() {
temp = dht.readTemperature(); temp = dht.readTemperature();
tempH = (dhtH.readTemperature()-0.16); //kalibracja tempH = (dhtH.readTemperature()-0.16); //kalibracja
if (isnan(tempH)) { tempH = lastTempH;}
tempM = (dhtM.readTemperature()+0.08); //kalibracja tempM = (dhtM.readTemperature()+0.08); //kalibracja
if (isnan(tempH)) { tempM = lastTempM;}
tempL = (dhtL.readTemperature()+0.0); tempL = (dhtL.readTemperature()+0.0);
if (isnan(tempL)) { tempL = lastTempL;}
hum = dht.readHumidity(); hum = dht.readHumidity();
humH = (dhtH.readHumidity()+0.0); humH = (dhtH.readHumidity()+0.0);
if (isnan(humH)) { humH = lastHumH;}
humM = (dhtM.readHumidity()-3.2); //kalibracja humM = (dhtM.readHumidity()-3.2); //kalibracja
if (isnan(humM)) { humM = lastHumM;}
humL = (dhtL.readHumidity()+1.7); //kalibracja humL = (dhtL.readHumidity()+1.7); //kalibracja
if (isnan(humL)) { humL = lastHumL;}
// Compute heat index in Celsius (isFahreheit = false) // Compute heat index in Celsius (isFahreheit = false)