diff --git a/Weather/Arduino/SwitchDoc/SwitchDoc.ino b/Weather/Arduino/SwitchDoc/SwitchDoc.ino index cfaee5b..f5d5fa2 100644 --- a/Weather/Arduino/SwitchDoc/SwitchDoc.ino +++ b/Weather/Arduino/SwitchDoc/SwitchDoc.ino @@ -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, ","); diff --git a/Weather/Arduino/SwitchDoc/makefile b/Weather/Arduino/SwitchDoc/makefile index 1ae88dc..4c1dead 100644 --- a/Weather/Arduino/SwitchDoc/makefile +++ b/Weather/Arduino/SwitchDoc/makefile @@ -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