Update temp and pressure units

This commit is contained in:
2021-05-29 00:15:53 +00:00
parent a750aac1a4
commit 74d1d3551e
2 changed files with 5 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ void loop()
float bmp280_Pressure = 0.0;
bmp280_Pressure = bmp280.readPressure();
bmp280_Temperature = bmp280.readTemperature();
bmp280_Temperature = (bmp280.readTemperature() * 9.0 / 5.0) + 32.0;
uint32_t tsl2591_Luminosity = 0;
uint16_t tsl2591_IR = 0;
@@ -90,7 +90,7 @@ void loop()
float sht31_Temperature = 0.0;
float sht31_Humidity = 0.0;
sht31_Temperature = sht31.readTemperature();
sht31_Temperature = (sht31.readTemperature() * 9.0 / 5.0) + 32.0;
sht31_Humidity = sht31.readHumidity();
char returnString[200];
@@ -132,7 +132,7 @@ void loop()
tempString[0] = '\0';
strcat(returnString, "bp=");
dtostrf(bmp280_Pressure / 100, 0, 2, tempString);
dtostrf(bmp280_Pressure, 0, 2, tempString);
strcat(returnString, tempString);
strcat(returnString, ",");

View File

@@ -3,9 +3,9 @@ weather:
arduino-cli compile --fqbn arduino:avr:uno --output-dir bin
install:
# kubectl scale --replicas=0 --namespace=home-monitor deployment/weather-serial-reader
kubectl scale --replicas=0 --namespace=home-monitor deployment/weather-serial-reader
arduino-cli upload --fqbn arduino:avr:uno -p /dev/ttyACM0 --input-dir bin
# kubectl scale --replicas=1 --namespace=home-monitor deployment/weather-serial-reader
kubectl scale --replicas=1 --namespace=home-monitor deployment/weather-serial-reader
debug:
minicom -b 115200 -D /dev/ttyACM0