Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos HCSR04
Diff: main.cpp
- Revision:
- 1:a38d3531c822
- Parent:
- 0:de082043a69d
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;