First Draft, serial print change based on distance

Revision:
7:7464fbb0f3e1
Parent:
6:18a4dd77057e
Child:
8:7e48229d678c
--- a/main.h	Mon Jan 24 22:35:08 2022 +0000
+++ b/main.h	Wed Jan 26 23:08:24 2022 +0000
@@ -1,10 +1,3 @@
-/**
-@file main.h
-@brief Header file containing functions prototypes, defines and global variables.
-@brief Revision 1.0.
-@author Wu Chyi Woon
-@date  May 2015
-*/
 
 #include "mbed.h"
 #include "N5110.h"
@@ -30,8 +23,6 @@
 // set the output in binary to make it easier, 0 is LED on, 1 is LED off
 int fsm[6] = {0b111110, 0b111101, 0b111011, 0b110111, 0b101111, 0b011111};
 
-void dist(int distance);
-
 void init_display();
 
 void main_menu();
@@ -44,6 +35,8 @@
 
 void calibrate_object();
 
+void dist(int distance);
+
 ultrasonic mu(PTD0, PTC12, .5, 1, &dist);    //Set the trigger pin to PTD0 and the echo pin to PTC12
                                         //have updates every .5 seconds and a timeout after 1
                                         //second, and call dist when the distance changes