A program designed to get the distance from an SRF02 distance sensor and create an audible and visual indication of that distance with data logging capabilities.

Dependencies:   N5110 PowerControl SRF02 mbed

Revision:
13:86520f8c3b72
Parent:
12:babcce84f9c8
Child:
14:acb6e07992bd
--- a/main.cpp	Fri May 08 08:58:45 2015 +0000
+++ b/main.cpp	Fri May 08 09:09:24 2015 +0000
@@ -123,7 +123,7 @@
     pc.printf("Data Logged\n"); //DEBUG MESSAGE
     FILE *fp = fopen("/local/log.csv", "a"); // open 'log.txt' for appending
 // if the file doesn't exist it is created, if it exists, data is appended to the end
-    fprintf(fp,"%s %d\n",data,dataDistance); // print string to file
+    fprintf(fp,"%s,%d\n",data,dataDistance); // print string to file
     fclose(fp); // close file
     if (mode<2) {
     leds = 1;