ECE 4180 / Mbed 2 deprecated 4180Lab3Part1

Dependencies:   mbed 4DGL-uLCD-SE HC_SR04_Ultrasonic_Library

Revision:
3:bc11c7809ffd
Parent:
2:3566c2d1e86b
--- a/main.cpp	Tue Sep 13 18:16:42 2016 +0000
+++ b/main.cpp	Sat Feb 16 18:23:14 2019 +0000
@@ -1,10 +1,16 @@
 #include "mbed.h"
 #include "ultrasonic.h"
+#include "uLCD_4DGL.h"  //lcd
+
+//lcd
+uLCD_4DGL uLCD(p13,p14,p30); // serial tx, serial rx, reset pin;
 
  void dist(int distance)
 {
     //put code here to execute when the distance has changed
-    printf("Distance %d mm\r\n", distance);
+    //uLCD.printf("Distance = %ld ft\r\n", distance);  
+    uLCD.printf("Distance = %d ft\r\n", distance);  
+    //printf("Distance %d mm\r\n", distance);
 }
 
 ultrasonic mu(p6, p7, .1, 1, &dist);    //Set the trigger pin to D8 and the echo pin to D9
@@ -19,5 +25,7 @@
         //Do something else here
         mu.checkDistance();     //call checkDistance() as much as possible, as this is where
                                 //the class checks if dist needs to be called.
+         
+        
     }
 }