Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: sd-driver_compatible_with_MAX32630FTHR
Fork of CircularBufferSDCardLib by
Diff: main.cpp
- Revision:
- 0:ebe71c7e7854
- Child:
- 2:c2cfb0ebc3bd
diff -r 000000000000 -r ebe71c7e7854 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Apr 03 21:50:25 2018 +0000
@@ -0,0 +1,43 @@
+#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);
+
+// main() runs in its own thread in the OS
+int main() {
+ //create value (16 bit like prox reading)
+
+ uint16_t a = 123;
+ uint16_t b = 2034;
+ uint16_t c = 1040;
+ uint16_t d = 8;
+ uint16_t e = 980;
+
+
+ boba->LogDistancePoint(a);
+ boba->LogDistancePoint(b);
+ boba->LogDistancePoint(c);
+ boba->LogDistancePoint(d);
+ boba->LogDistancePoint(e);
+
+ uint8_t* dooba = boba->getDistanceBlock();
+ int distanco = boba->getDistanceDataLength();
+
+ int ere = soba.writeBlock(dooba,distanco);
+ //printf("ERE IS %i \n",ere);
+
+
+ led1 = !led1;
+
+}
+
