DHT_CANSAT

Dependencies:   DHT22 mbed

Fork of DHT_TEST2 by mohamed gamal

Revision:
0:2dbb2497beb6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Aug 04 12:48:29 2015 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+#include "DHT22.h"
+DHT22 dht22(p23);
+int main() {
+    int hum;
+    int temp;
+    printf("Start\n");
+    printf("\r\nSetting up...\r\n");
+    while (1) {
+        dht22.sample() ;
+        hum=dht22.getHumidity()/10.0;
+        temp=dht22.getTemperature()/10.0;
+        printf("temp: %d  , hum:%d    ",temp,hum);
+        wait(1);
+        }}
\ No newline at end of file