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

Files at this revision

API Documentation at this revision

Comitter:
el13sr
Date:
Fri May 08 10:58:40 2015 +0000
Parent:
14:acb6e07992bd
Commit message:
1.0c - Fixed an error where the time once set over the serial would reset due to an initial condition within the main function.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri May 08 09:12:42 2015 +0000
+++ b/main.cpp	Fri May 08 10:58:40 2015 +0000
@@ -2,7 +2,7 @@
 * @file main.cpp
 * @brief Distance Sensor Project
 * @brief Main file containing all of the functions and the int main().
-* @brief Version: 1.0b
+* @brief Version: 1.0c
 * @author Sam Russell
 * @date March 2015
 */
@@ -168,7 +168,6 @@
     welcomeScreen(); ///4) Displays welcome screen.
     pc.attach(&serialISR); ///5) Attaches PC so when an interupt occurs over the serial the function "serialISR" is executed.
     char buffer[30]; ///6) Buffer created to store time string
-    set_time(0); ///7) Initialise time to 1st January 1970
 
     Button.rise(&buttonPressed); ///8) Configures & Initalises button pressed function.