Uses the SRF02 UDS and displays distance in a variety of ways on the N5110 LCD.

Dependencies:   N5110WN PowerControl SRF02 mbed

Revision:
9:163159830eaf
Parent:
8:ffcde84b8cf3
Child:
11:2b3d646e3bfb
--- a/main.h	Thu Apr 30 17:12:41 2015 +0000
+++ b/main.h	Fri May 01 11:26:19 2015 +0000
@@ -99,7 +99,7 @@
 float unitX=1; /*!< Float that stores the unit multiple if 1 unit is cm, 0.01 = m, 10 = mm */
 const char *units ="cm"; /*!< string of characters that stores the unit */
 int visual =0;/*!< integer that stores the visual display mode */
-
+int D=0; /*!< integer that helps store data in an array */
 // ---- Flags ----
 int timerFlag=0; /*!< flag used to trigger the timer ISR   */
 int timer2Flag=0; /*!< flag used to trigger the 2nd timer ISR   */
@@ -109,16 +109,16 @@
 
 // ---- MISC ----
 char Dbuffer [20];/*!<buffer used to store distance string */
-char buffer[30]; /*!<buffer used to store time string */
+char buffer[30]; /*!<buffer used to store time and date string */
 char rxString[16]; /*!< buffer to store received string   */
 LocalFileSystem local("local"); /*!< create local filesystem   */
-
+float array[84];/*!< creates an array that stores data   */
 Ticker timer; /*!< timer for first speed  */
 Ticker timer2;/*!< timer for second speed */
 Ticker timer3;/*!< timer for third speed  */
-
+float PrevArray[84];/*!< creates an array that stores Previous graph data   */
+char Gbuffer[30]; /*!<buffer used to store time string */
 //  ---- functions ----
-
 /**
 Contains the main code
 */
@@ -201,6 +201,10 @@
 */
 void LCDVis3();
 /**
+sets the parameters for the fifth visual mode
+*/
+void LCDVis4();
+/**
 sets an image of a car in pixels
 */
 void car();
@@ -242,11 +246,12 @@
 /**
 @brief sets the Finite State Machine for the Visual toggle.
 */
-VSTyp Vfsm[4] = {
+VSTyp Vfsm[5] = {
  {0,{0,1}}, /*!< State 0: stays in the current state unless input is recieved */ 
  {1,{1,2}},  /*!< State 1: stays in the current state unless input is recieved  */ 
  {2,{2,3}}, /*!< State 2: stays in the current state unless input is recieved  */
- {3,{3,0}} /*!< State 3: stays in the current state unless input is recieved  */  
+ {3,{3,4}}, /*!< State 3: stays in the current state unless input is recieved  */
+ {4,{4,0}} /*!< State 3: stays in the current state unless input is recieved  */    
 }; 
 int Vstate=0;/*!< sets the initial state */