mbed Weather Platform firmware http://mbed.org/users/okini3939/notebook/mbed-weather-platform-firmware/

Dependencies:   ChaNFSSD EthernetNetIf I2CLEDDisp Agentbed ChaNFSUSB ILinterpreter mbed BMP085 WeatherMeters ConfigFile ChaNFS I2CLCD

Revision:
1:6c7141895545
Parent:
0:bdb53686c194
Child:
2:a3e5edf84f74
--- a/main.cpp	Mon Jul 04 15:16:45 2011 +0000
+++ b/main.cpp	Sun Jul 10 15:36:46 2011 +0000
@@ -1,12 +1,25 @@
+/*
+ * Weather Station - mbed Weather Platform
+ * Copyright (c) 2011 Hiroshi Suga
+ * Released under the MIT License: http://mbed.org/license/mit
+ */
+
+/** @file
+ * @brief Weather Station
+ */
+
 #include "mbed.h"
 #include "weather.h"
 
 const char VERSION[] = "mbed Weather Platform 0.4.0 (C) 2011 Suga koubou";
 Serial pc(USBTX, USBRX);
 DigitalOut led1(LED1), led2(LED2), led3(LED3), led4(LED4);
+#ifdef USE_3LED
+DigitalOut led_red(p28), led_yellow(p23);
+#endif
 static volatile int interval = 60;
 char csv[120];
-static char csv_mesg[120] = "%y-%m-%d %h:%i:%s,%.2P,%.2T,%.2H,%.2A,%.2V,%.2R,%.2L,%.2U,%.2M,%.2p\r\n";
+static char csv_mesg[120] = "%y-%m-%d %h:%i:%s,%.2P,%.2T,%.2H,%.2A,%.2V,%.2R,%.2L,%.2U,%.2M,%.2p";
 
 
 // Interrupt 10Hz
@@ -18,7 +31,7 @@
     pool_ilip();
     pool_display();
 
-    LED_NET_OFF;
+    LED_NET_ACT_OFF;
 }
 
 void init () {
@@ -70,7 +83,9 @@
         // create CSV
         format_str(csv_mesg, csv, sizeof(csv));
         pc.printf(csv);
+        pc.printf("\r\n");
         write_log(csv);
+        update_display();
 
         // in/out
         exec_ilip(1);