![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
...
Diff: globals.cpp
- Revision:
- 2:82b72fa8dbcd
- Child:
- 3:b91371837109
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/globals.cpp Sun May 28 17:36:57 2017 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +BusOut leds(LED1,LED2,LED3,LED4); +DigitalOut trigger1(p14); +DigitalOut trigger2(p16); +DigitalOut trigger3(p18); +InterruptIn echo(p11); +AnalogIn AnaG(p17); +AnalogIn AnaAV(p15); +PwmOut MD(p21); //vitesse moteur gauche +PwmOut MG(p24); //vitesse moteur droit +DigitalOut sensMG(p23); // sens moteur gauche +DigitalOut sensMD(p26); // sens moteur droit +Timer temp,t; +Ticker tic1,tic2; + +int drap=1,flag1=0,flag2=0,flag3=0,flag4=0,flag5=0; +float US1,US2,US3,AN1,AN2,US1_av=50,US2_av=50,US3_av=50,AN1_av=50,AN2_av=50; +float E_av,E,iE=0; +float cmdG=0,cmdD=0; +int etat=0; +float iecart=0,ecart_av,ecart; +