Etienne Stransky
/
E_SRF05_HelloWorld
ok
Diff: main.cpp
- Revision:
- 1:fe48c0878de2
- Parent:
- 0:d87132986e8f
--- 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