NXP Group 13 / Mbed 2 deprecated Car3

Dependencies:   camera mbed tsi_sensor

Fork of Car2 by Zach Matthews

Revision:
23:6e1e142b7baf
Parent:
22:9ef4a01e5038
Child:
24:6219b8ce421f
diff -r 9ef4a01e5038 -r 6e1e142b7baf main.cpp
--- a/main.cpp	Mon Apr 17 00:41:26 2017 +0000
+++ b/main.cpp	Mon Apr 17 01:08:11 2017 +0000
@@ -181,6 +181,16 @@
         }
 }
 
+/*
+    Function: display
+    Description: This function is used to display what the camera sees to a 
+        computer.
+                *Before using this function, the car should be connected to the
+        computer. The car should also not be running. This is necessary because
+        printing while the car is running will slow it way down and potentially
+        cause it to crash.
+    
+*/
 void display(int frame[]){
     char draw = 'x';
     for(int i = 0; i< 128; i++){
@@ -193,6 +203,12 @@
     pc.printf("\r");
 }
 
+/*
+    Function: setThreshold
+    Description: This function is used when the car first starts. It checks the 
+        lightest value and the darkest value it can find, averages them and uses
+        that as the light/dark threshold.
+*/
 void setThreshold(){
     cam.capture();
     int low = 99;