Wyrównanie wartości x3
Poprawa Excel
This commit is contained in:
Binary file not shown.
@@ -9,7 +9,7 @@
|
|||||||
#include "SD.h"
|
#include "SD.h"
|
||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
|
|
||||||
#define Version "0.41"
|
#define Version "0.43"
|
||||||
#define WIRE Wire
|
#define WIRE Wire
|
||||||
#define DHTTYPE DHT22
|
#define DHTTYPE DHT22
|
||||||
#define DHTPIN 4 //GPIO04 D4
|
#define DHTPIN 4 //GPIO04 D4
|
||||||
@@ -49,16 +49,29 @@ int menuL0 = 10;
|
|||||||
int menuL1 = 10;
|
int menuL1 = 10;
|
||||||
int menuL2 = 10;
|
int menuL2 = 10;
|
||||||
|
|
||||||
float hum;
|
float temp = 0.0;
|
||||||
float humL;
|
float tempH = 0.0;
|
||||||
float humM;
|
float tempHCalc = 0.0;
|
||||||
float humH;
|
float lastTempH = 0.0;
|
||||||
float temp;
|
float tempM = 0.0;
|
||||||
float tempL;
|
float tempMCalc = 0.0;
|
||||||
float tempM;
|
float lastTempM = 0.0;
|
||||||
float tempH;
|
float tempL = 0.0;
|
||||||
float heat_idx;
|
float tempLCalc = 0.0;
|
||||||
|
float lastTempL = 0.0;
|
||||||
|
|
||||||
|
float hum = 0.0;
|
||||||
|
float humH = 0.0;
|
||||||
|
float humHCalc = 0.0;
|
||||||
|
float lastHumH = 0.0;
|
||||||
|
float humM = 0.0;
|
||||||
|
float humMCalc = 0.0;
|
||||||
|
float lastHumM = 0.0;
|
||||||
|
float humL = 0.0;
|
||||||
|
float humLCalc = 0.0;
|
||||||
|
float lastHumL = 0.0;
|
||||||
|
|
||||||
|
float heat_idx;
|
||||||
|
|
||||||
int secs;
|
int secs;
|
||||||
int mins;
|
int mins;
|
||||||
@@ -293,6 +306,19 @@ void setup() {
|
|||||||
quickBatteryVoltage2 = batteryVoltage;
|
quickBatteryVoltage2 = batteryVoltage;
|
||||||
quickBatteryVoltage3 = batteryVoltage;
|
quickBatteryVoltage3 = batteryVoltage;
|
||||||
quickBatteryVoltage4 = batteryVoltage;
|
quickBatteryVoltage4 = batteryVoltage;
|
||||||
|
|
||||||
|
tempH = (dhtH.readTemperature()-0.16);
|
||||||
|
lastTempH = tempH;
|
||||||
|
tempM = (dhtM.readTemperature()+0.08);
|
||||||
|
lastTempM = tempM ;
|
||||||
|
tempL = (dhtL.readTemperature()+0.0);
|
||||||
|
lastTempL = tempL;
|
||||||
|
tempHCalc = ( tempH + lastTempH )/2;
|
||||||
|
tempMCalc = ( tempM + lastTempM )/2;
|
||||||
|
tempLCalc = ( tempL + lastTempL )/2;
|
||||||
|
humHCalc = ( humH + lastHumH )/2;
|
||||||
|
humMCalc = ( humM + lastHumM )/2;
|
||||||
|
humLCalc = ( humL + lastHumL )/2;
|
||||||
//setup END
|
//setup END
|
||||||
//######################
|
//######################
|
||||||
}
|
}
|
||||||
@@ -312,12 +338,12 @@ void loop() {
|
|||||||
tempH = (dhtH.readTemperature()-0.16); //kalibracja
|
tempH = (dhtH.readTemperature()-0.16); //kalibracja
|
||||||
tempM = (dhtM.readTemperature()+0.08); //kalibracja
|
tempM = (dhtM.readTemperature()+0.08); //kalibracja
|
||||||
tempL = (dhtL.readTemperature()+0.0);
|
tempL = (dhtL.readTemperature()+0.0);
|
||||||
|
|
||||||
hum = dht.readHumidity();
|
hum = dht.readHumidity();
|
||||||
humH = (dhtH.readHumidity()+0.0);
|
humH = (dhtH.readHumidity()+0.0);
|
||||||
humM = (dhtM.readHumidity()-3.2); //kalibracja
|
humM = (dhtM.readHumidity()-3.2); //kalibracja
|
||||||
humL = (dhtL.readHumidity()+1.7); //kalibracja
|
humL = (dhtL.readHumidity()+1.7); //kalibracja
|
||||||
|
|
||||||
|
|
||||||
// Compute heat index in Celsius (isFahreheit = false)
|
// Compute heat index in Celsius (isFahreheit = false)
|
||||||
heat_idx = dht.computeHeatIndex(temp, hum, false);
|
heat_idx = dht.computeHeatIndex(temp, hum, false);
|
||||||
|
|
||||||
@@ -680,6 +706,18 @@ void loop() {
|
|||||||
File file = SD.open("/TempHumLog.txt", FILE_APPEND);
|
File file = SD.open("/TempHumLog.txt", FILE_APPEND);
|
||||||
if (file) {
|
if (file) {
|
||||||
display.fillRect(0, 0, 124, 64, SSD1306_WHITE);
|
display.fillRect(0, 0, 124, 64, SSD1306_WHITE);
|
||||||
|
tempHCalc = ( tempH + lastTempH )/2;
|
||||||
|
tempMCalc = ( tempM + lastTempM )/2;
|
||||||
|
tempLCalc = ( tempL + lastTempL )/2;
|
||||||
|
humHCalc = ( humH + lastHumH )/2;
|
||||||
|
humMCalc = ( humM + lastHumM )/2;
|
||||||
|
humLCalc = ( humL + lastHumL )/2;
|
||||||
|
lastTempH = tempH;
|
||||||
|
lastTempM = tempM;
|
||||||
|
lastTempL = tempL;
|
||||||
|
lastHumH = humH;
|
||||||
|
lastHumM = humM;
|
||||||
|
lastHumL = humL;
|
||||||
file.print(leadZero(dayss));
|
file.print(leadZero(dayss));
|
||||||
file.print("/");
|
file.print("/");
|
||||||
file.print(leadZero(months));
|
file.print(leadZero(months));
|
||||||
@@ -696,17 +734,17 @@ void loop() {
|
|||||||
file.print("; ");
|
file.print("; ");
|
||||||
file.print(formatNumber(heat_idx));
|
file.print(formatNumber(heat_idx));
|
||||||
file.print("; ");
|
file.print("; ");
|
||||||
file.print(formatNumber(tempH));
|
file.print(formatNumber(tempHCalc));
|
||||||
file.print("; ");
|
file.print("; ");
|
||||||
file.print(formatNumber(humH));
|
file.print(formatNumber(humHCalc));
|
||||||
file.print("; ");
|
file.print("; ");
|
||||||
file.print(formatNumber(tempM));
|
file.print(formatNumber(tempMCalc));
|
||||||
file.print("; ");
|
file.print("; ");
|
||||||
file.print(formatNumber(humM));
|
file.print(formatNumber(humMCalc));
|
||||||
file.print("; ");
|
file.print("; ");
|
||||||
file.print(formatNumber(tempL));
|
file.print(formatNumber(tempLCalc));
|
||||||
file.print("; ");
|
file.print("; ");
|
||||||
file.println(formatNumber(humL));
|
file.println(formatNumber(humLCalc));
|
||||||
file.close();
|
file.close();
|
||||||
delay(1000);
|
delay(1000);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user