Data log for logging enviornmental, process and system state to FRAM or EPROM chips that do not have support for a file system. Includes support for multiple record types, evolving record types, automatic date and time stamp and copying contents to serial. Will soon support journaling to micro SD file system. We always log to fram first for speed and power conserfaction then copy in bulk to SD cards when we have charging power available.

Dependencies:   data_log mbed

Flexible Data Logger Example Use and Test Code

Detailed Documentation

See home page for data log library https://developer.mbed.org/users/joeata2wh/code/data_log/

License

By Joseph Ellsworth CTO of A2WH Take a look at A2WH.com Producing Water from Air using Solar Energy March-2016 License: https://developer.mbed.org/handbook/MIT-Licence Please contact us http://a2wh.com for help with custom design projects.

Revision:
5:5fd55c860c09
Parent:
3:ee7427ad4745
Child:
7:3886935f9364
--- a/main.cpp	Thu Mar 31 19:20:08 2016 +0000
+++ b/main.cpp	Thu Mar 31 22:05:19 2016 +0000
@@ -10,7 +10,7 @@
     
 #include "mbed.h"
 #include "dataLog.h"  
-#include "serial-command.h"
+
 const float adc_ref = 3.3f;
 // SPI PINS 
 #define SPI1_SCK PA_5
@@ -26,7 +26,7 @@
 //#define DO_LOG_ERASE  // uncomment to erase the existing log.
 //#define DO_SEND_MANUAL  // uncomment to send first 1000 bytes to pc on startup
 //#define DO_SEND_ALL // uncomment to send entire log to PC on startup
-#define DO_SEND_LAST // uncomment to sent last 900 bytes to pc on startup
+//#define DO_SEND_LAST // uncomment to sent last 900 bytes to pc on startup
 
 AnalogIn waterTempSense(A0);
 AnalogIn oxygenLevelSense(A1);
@@ -102,11 +102,12 @@
     char dlbuff[81]; // buffer used internally by this instance of data log
     DataLogChipType dlchip(dataLogMOSIPin, dataLogMISOPin, dataLogCLKPin, dataLogSelectPin);
     pc.printf("\r\nInitialized Data Log Chip");
-    struct DLOG *lgr = dlMake(&dlchip, dlbuff, 80);    
+    struct DLOG *lgr = dlMake(&dlchip, dlbuff, 80, &pc);    
     
     pc.printf("\r\nInitialized Logger\r\n");    
     pc.printf("logger nextWritePos=%ld", lgr->nextWritePos);
     
+    dlHelp(lgr); // send data log command help to pc. 
     #ifdef DO_LOG_ERASE
       //Erase the log But only if you really want to loose the
       // data