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:
1:387d5e6fa05f
Parent:
0:7d01de89a1ff
Child:
2:ebcfecb68cca
--- a/main.h	Wed Apr 08 16:57:08 2015 +0000
+++ b/main.h	Wed Apr 08 18:41:31 2015 +0000
@@ -13,7 +13,7 @@
 InterruptIn Button(p17); //Logging Data? (Saving to mbed)
 
 //Outputs
-AnalogOut LogLED(p18); // Logging To Disk Indicator
+AnalogOut logLED(p18); // Logging To Disk Indicator
 //            vcc,sce,rst,dc,mosi,clk,led
 N5110 display(p7,p8,p9,p10,p11,p13,p26);
 PwmOut Buzzer(p21); //Alert Buzzer
@@ -22,7 +22,7 @@
 Serial pc(USBTX,USBRX);
 
 LocalFileSystem local("local"); // create local filesystem
-void writeDataToFile(float data); //Creates the void which takes the two types of data into the function.
+void writeDataToFile(char* data, float Distancedata); //Creates the void which takes the two types of data into the function.
 
 Ticker timer;
 
@@ -31,6 +31,7 @@
 int buttonFlag = 0; //initialise buttonFlag to be 0, which defines the state of the data logger.
 char rxString[16]; // buffer to store received string
 int light =0;
+int setTimeFlag = 0;
 
 void modeSwitch();
 void error(int code);