Data logger: Sensors -> Barometer & temperature (BMP180), Humidity & temp. (RHT03), Sunshine (Cds): Display -> 20 chracters x 4 lines: Strage -> EEPROM (AT24C1024): Special functions -> Enter sleep mode to save current, reading the logging data via serial line
Dependencies: AT24C1024 BMP180 M41T62 RHT03 TextLCD WakeUp mbed
Fork of LPC1114_barometer_with_data_logging by
Please refer following Notebook.
http://mbed.org/users/kenjiArai/notebook/mbed-lpc1114fn28-data-logger/
Diff: mon.cpp
- Revision:
- 18:2a1d75bc8ebc
- Parent:
- 16:f164f8912201
--- a/mon.cpp Thu Jul 03 23:07:13 2014 +0000 +++ b/mon.cpp Mon Aug 11 21:56:18 2014 +0000 @@ -7,7 +7,7 @@ * http://mbed.org/users/kenjiArai/ * Created: May 15th, 2010 * Spareted: June 25th, 2014 mon() & mon_hw() - * Revised: July 3rd, 2014 + * Revised: August 12th, 2014 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE @@ -224,7 +224,6 @@ inf.buf_pointer[i] = at24c1024.read((int)addr); wait(0.002); } -// PRINTF("head %d, Tail %d\r\n", inf.log_inf.head, inf.log_inf.tail); } // Write one packet @@ -238,7 +237,6 @@ inf.buf_pointer[i] = at24c1024.read((int)addr); wait(0.002); } - //PRINTF("head %d, Tail %d\r\n", inf.log_inf.head, inf.log_inf.tail); // Write data_pack[] into EEPROM for (i = 0; i < PKT_SIZE; i++){ addr = (uint8_t *)(EEP_TOP + (inf.log_inf.tail * PTR_SIZE) + i); @@ -401,7 +399,9 @@ PRINTF(mon_msg); put_rn(); PRINTF("d - Data logger"); put_rn(); PRINTF("t - Check and set RTC"); put_rn(); +#if 0 PRINTF("x - Goto HW monitor"); put_rn(); +#endif PRINTF("q - Return to main"); put_rn(); } @@ -558,6 +558,7 @@ PRINTF("q - Exit DL mode"); put_rn(); break; default: + put_r(); PUTC('?'); put_rn(); break; @@ -601,6 +602,7 @@ put_r(); msg_hlp(); break; +#if 0 //--------------------------------------------------------------------------------- // Go to special command //--------------------------------------------------------------------------------- @@ -608,6 +610,7 @@ mon_hw(); PRINTF("->Came back monitor\r\n"); break; +#endif //--------------------------------------------------------------------------------- // Go back to main() //---------------------------------------------------------------------------------