![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Capteur_US
Diff: main.cpp
- Revision:
- 16:4c0b1647e8ae
- Parent:
- 14:dd3c756c6d48
--- a/main.cpp Mon Sep 28 19:17:00 2020 +0000 +++ b/main.cpp Tue Oct 13 14:50:31 2020 +0000 @@ -22,6 +22,7 @@ // debug pc.attach(&serialIT); // Interruption liaison série + bt.attach(&bluetoothIT); // Interruption bluetooth pc.baud(9600); pc.format(8,SerialBase::None,1); @@ -57,8 +58,32 @@ cddA.rise(&cddaRise); cdgA.mode(PullUp); cddA.mode(PullUp); - + + + float* dist; // adresse du tableau distance while(1) { - + } } +/* + while(1) { + captUS_trig(); + dist = convertToDistance(); + for(char i = 0; i < 6 ; i++) + printf("%d : %f\n\r",i,dist[i]); + + printf("\n\r"); + printf("\n\r"); + printf("\n\r"); + + + + for(char i = 0; i < 6 ; i++) + printf("%d : %d\n\r",i,obstacleSpoted(dist[i],1500,0 ,0,i)); + + + + wait(1); + } + +*/ \ No newline at end of file