david steven camargo / Mbed OS proyecto_2_avanzados_final

Dependencies:   Servo

Files at this revision

API Documentation at this revision

Comitter:
DAVIID222
Date:
Thu Dec 03 13:19:37 2020 +0000
Parent:
1:5b8b3a6e9f8c
Commit message:
hola

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Nov 18 17:00:44 2020 +0000
+++ b/main.cpp	Thu Dec 03 13:19:37 2020 +0000
@@ -3,11 +3,9 @@
 #include "Servo.h"
 
 Serial pc(USBTX, USBRX);
-
 DigitalOut trig(D3);
 DigitalIn echo(D2);
 Servo myservo(D4);
-
 Thread hilo_tarea1;
 Thread hilo_tarea2;
 Timer senal;
@@ -41,7 +39,7 @@
         while(echo==1);
         senal.stop();
         distancia = (senal.read_us())/58;
-        pc.printf("%.f;%.f\n\r",angle,distancia);
+        pc.printf("' ',%f,%f,\r\n' '",angle,distancia);
         ThisThread::sleep_for(50);
     }
 }