Create this program

Dependencies:   mbed HCSR04 HMC6352 PID TextLCD

Revision:
3:901d18b901b4
Parent:
2:a8bbf677e774
--- a/ultrasonic.h	Thu Aug 06 00:19:29 2015 +0000
+++ b/ultrasonic.h	Fri Aug 07 06:34:36 2015 +0000
@@ -14,6 +14,7 @@
 class Ultrasonic {
 public:
     Ultrasonic(PinName trig, PinName echo);
+    ~Ultrasonic();
     int measureDist(void);
 
 private:
@@ -25,6 +26,10 @@
     hcsr04 = new HCSR04(trig, echo);
 }
 
+Ultrasonic::~Ultrasonic() {
+    delete hcsr04;
+}
+
 // return distance from something
 int Ultrasonic::measureDist(void) {
     wait(0.1);