Simple and easy editable program for weather stations

Dependencies:   mbed mbed-STM32F103C8T6 thermistor HMC5883L DHT11 USBDevice

Revision:
1:f2402d1acb80
Parent:
0:eb7b33d1b081
Child:
2:8ba36a81fd17
diff -r eb7b33d1b081 -r f2402d1acb80 main.cpp
--- a/main.cpp	Sun May 17 18:10:48 2020 +0000
+++ b/main.cpp	Tue May 19 10:35:10 2020 +0000
@@ -3,12 +3,12 @@
 #include "USBSerial.h"
 #include "thermistor.h"
 #include "HMC5883L.h"
- #include "Dht11.h"
+#include "DHT11.h"
 
 DigitalOut led(PC_13);
 Thermistor my_thermistor(ADC_TEMP, 10000, 3950, 4700);
 HMC5883L wind_direction(I2C_SDA, I2C_SCL);
-Dht11 temphum(PB_13);
+DHT11 temphum(PB_12);
 
 int main()
 {
@@ -17,11 +17,11 @@
     
     usb.printf("\nReading temperature from internal sensor in processor\n");
     while(1) {
-        sensor.read()
+        temphum.readData();
         usb.printf("Thermistor = %f\n", my_thermistor.temperature());
         usb.printf("Heading = %f\n", wind_direction.getHeadingXYDeg());
-        usb.printf("Temperature DHT11 = %f\n", temphum.getCelsius());
-        usb.printf("Humidity DHT11 = %f\n", temphum.getHumidity());
+        usb.printf("Temperature DHT11 = %f\n", temphum.readTemperature());
+        usb.printf("Humidity DHT11 = %f\n", temphum.readHumidity());
         led = !led;
         wait(1.0);
     }