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

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Wed Oct 12 02:18:00 2011 +0000
Parent:
4:46ad190e6328
Child:
6:898c306f7990
Commit message:

Changed in this revision

file.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
weather.h Show annotated file Show diff for this revision Revisions of this file
--- a/file.cpp	Fri Oct 07 14:55:17 2011 +0000
+++ b/file.cpp	Wed Oct 12 02:18:00 2011 +0000
@@ -37,6 +37,7 @@
     fp = fopen(filename, "a");
     if (fp) {
         fprintf(fp, buf);
+        fprintf(fp, "\r\n");
         fclose(fp);
     } else {
         LED_FILE_ACT_OFF;
--- a/main.cpp	Fri Oct 07 14:55:17 2011 +0000
+++ b/main.cpp	Wed Oct 12 02:18:00 2011 +0000
@@ -87,7 +87,11 @@
         format_str(conf.csv_mesg, csv, sizeof_1(csv));
         pc.printf(csv);
         pc.printf("\r\n");
-        write_log(csv);
+        if (write_log(csv)) {
+            pc.printf("error: can't open file.\r\n");
+        }
+
+        // I2C LCD or LED
         update_display();
 
         // in/out
--- a/weather.h	Fri Oct 07 14:55:17 2011 +0000
+++ b/weather.h	Wed Oct 12 02:18:00 2011 +0000
@@ -15,7 +15,7 @@
 
 #undef DEBUG
 
-#define PCB_LOT 1 // PCB version 0:i, 1:ro, 2:ha
+#define PCB_LOT 0 // PCB version 0:i, 1:ro, 2:ha
 
 #define REG_LIGHT 1 // k ohm
 #define REG_UV 100 // k ohm