mbed Weather Station for Weatherduino on mbeduino http://mbed.org/users/okini3939/notebook/weatherduino-on-mbed/

Dependencies:   mbed

Revision:
0:6e444b317905
Child:
1:23400c328a71
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Sep 27 15:52:09 2010 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+#include "BMP085.h"
+#include "SHT.h"
+#include "WeatherMeters.h"
+
+I2C i2c(p9, p10);
+
+BMP085 bmp085(i2c, BMP085_oss4);
+SHT sht11(p24, p12, SHT_high); // sclock, data
+WeatherMeters wmeters(p30, p17, p21); // anemo, vane, rain
+
+DigitalOut myled(LED1);
+Serial pc(USBTX, USBRX);
+
+int main() {
+    while(1) {
+        myled = 1;
+
+        bmp085.update();
+        pc.printf("p:%6.2f hPa / t:%6.2f C\n", bmp085.get_pressure(), bmp085.get_temperature());
+
+        sht11.update(SHT_high);
+        pc.printf("t:%6.2f C / h:%6.2f %%\n", sht11.get_temperature(), sht11.get_humidity());
+
+        pc.printf("a:%6.2f m/s / v:%6.2f / r:%6.2f mm\n", wmeters.get_windspeed(), wmeters.get_windvane(), wmeters.get_raingauge());
+
+        myled = 0;
+        wait(10);
+    }
+}