ver 2 ultrasonic

Dependencies:   mbed mbed-rtos HCSR04

Files at this revision

API Documentation at this revision

Comitter:
mohamed2011
Date:
Fri Mar 15 14:41:19 2019 +0000
Parent:
0:de082043a69d
Commit message:
Cambios menores;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
diff -r de082043a69d -r a38d3531c822 main.cpp
--- a/main.cpp	Mon Mar 11 19:25:58 2019 +0000
+++ b/main.cpp	Fri Mar 15 14:41:19 2019 +0000
@@ -1,5 +1,7 @@
 #include "mbed.h"
+#include "rtos.h"
 #include "hcsr04.h"
+
 float a=0;
 float b=0;
 float x=0;
@@ -31,6 +33,9 @@
         avanza(1);
         }
     }
+    
+    
+ //Funciones de control de avance y retroceso del vehículo   
 void avanza(float a)
     {
         pin1 = 1;
@@ -58,7 +63,7 @@
         pin2 = 1;
         pin3 = 0;
         pin4 = 1;
-        wait(y);
+        osDelay(y);
         }
 void derecha(float z){
         pin1 = 0;
diff -r de082043a69d -r a38d3531c822 mbed-rtos.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Fri Mar 15 14:41:19 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/ST/code/mbed-rtos/#83895f30f8f2