Sonar Simples

Dependencies:   HCSR04

Revision:
0:e2112f4ac360
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sonar.cpp	Thu Sep 29 16:49:08 2016 +0000
@@ -0,0 +1,13 @@
+#include "sonar.h"
+#include "mbed.h"
+#include "hcsr04.h"
+
+Sonar::Sonar():
+_ultrasonic(Sonar::trigger, Sonar::echo){   
+}
+
+float Sonar::lerDistancia(HCSR04 _HCSR04){
+    _HCSR04.distance();
+    float distance = _HCSR04;
+    return distance;
+}
\ No newline at end of file