ok

Dependencies:   mbed

Fork of _test_suivi_mur by christophe vermaelen

globals.cpp

Committer:
pirottealex
Date:
2017-06-23
Revision:
7:2f4660e9cf92
Parent:
3:b91371837109

File content as of revision 7:2f4660e9cf92:

#include "mbed.h"
#include "Pixy.h"
#include "PixyLink.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(p24); //vitesse moteur gauche
PwmOut MG(p21); //vitesse moteur droit
DigitalOut sensMG(p26);  // sens moteur gauche
DigitalOut sensMD(p23);  // sens moteur droit
Timer temp,t,t2,tr,tb,to;
Ticker tic1,tic2;
DigitalIn jack(p25);
DigitalIn capb1 (p29), capb2 (p30);
PwmOut servo(p22);


uint16_t blocks;
int j=0,capg,capd ;
int errorX = 0, errorY = 0,start_memo_pixy;
float capt_m,capt_d,capt_g,capt_ed,capt_eg;
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,E0=0,E1=0,E2=0,E3=0;
int etat=0,jck,start_cap_pixy=0;
float corg,cord,taille,cmdD,cmdG,erreur_cap;
float cap_lum,cap,tot_capt,pixy_cap,turn=0.0;