ok

Dependencies:   mbed SRF05

Files at this revision

API Documentation at this revision

Comitter:
stersky
Date:
Tue Feb 12 14:50:06 2019 +0000
Parent:
0:d87132986e8f
Commit message:
ok

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r d87132986e8f -r fe48c0878de2 main.cpp
--- a/main.cpp	Fri Nov 19 22:36:20 2010 +0000
+++ b/main.cpp	Tue Feb 12 14:50:06 2019 +0000
@@ -3,11 +3,19 @@
 #include "mbed.h"
 #include "SRF05.h"
 
-SRF05 srf(p13, p14);
+//Initialisation des lectures des capteurs à ultrasons
+SRF05 srf1(p6, p5);
+
+//Initialisation des lectures de la télécommande
+
+Serial PC(USBTX, USBRX);
  
 int main() { 
+
+    PC.baud(460800);
+    
      while(1) { 
-         printf("Distance = %.1f\n", srf.read());              
+         PC.printf("Distance1 = %1fcm\n\r", srf1.read());              
          wait(0.2); 
      } 
  } 
\ No newline at end of file