A set of data recording functions to locally store data in a circular buffer, with functions for offloading to an SD Card when convenient. dataRecorderr.h shows accessible functions to the main program - all direct SD operations are abstracted away by the library. When using this library, #include dataRecorder.h
Dependencies: sd-driver_compatible_with_MAX32630FTHR
Fork of CircularBufferSDCardLib by
Diff: main.cpp
- Revision:
- 3:df8fb1b5d868
- Parent:
- 2:c2cfb0ebc3bd
- Child:
- 4:fe6d2823b7cb
--- a/main.cpp Wed Apr 04 16:17:34 2018 -0400 +++ b/main.cpp Wed Apr 04 17:15:36 2018 -0400 @@ -1,17 +1,12 @@ #include "mbed.h" -#include "sdCardReader.h" #include "dataRecorder.h" - -static const char *sd_file_path = "/sd/out.txt"; - DataRecorder* boba = new DataRecorder(); -static SDCardReader soba;// = new SDCardReader(); //For SDCard -// Set up the button to trigger an erase -InterruptIn irq(BUTTON1); -DigitalOut led1(LED1); +// Set up the button +InterruptIn irq(PF_2); +DigitalOut led1(PE_0); // main() runs in its own thread in the OS int main() { @@ -22,13 +17,25 @@ uint16_t c = 1040; uint16_t d = 8; uint16_t e = 980; - + + uint32_t ta = 2121; + uint32_t tb = 8181; + uint32_t tc = 6262; + uint32_t td = 3535; + uint32_t te = 1212; - boba->LogDistancePoint(a); - boba->LogDistancePoint(b); - boba->LogDistancePoint(c); - boba->LogDistancePoint(d); - boba->LogDistancePoint(e); + boba->logDistancePoint(a); + boba->logDistancePoint(b); + boba->logDistancePoint(c); + boba->logDistancePoint(d); + boba->logDistancePoint(e); + + boba->logTimeStamp(a); + boba->logTimeStamp(b); + boba->logTimeStamp(c); + boba->logTimeStamp(d); + boba->logTimeStamp(e); + //printf("ERE IS %i \n",ere);