Llenard Gonzalo / Mbed 2 deprecated Racing_14050239

Dependencies:   mbed SRF05

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers variables.h Source File

variables.h

00001 #include "mbed.h"
00002 #include "SRF05.h"
00003 
00004 #define fulldrive 0.0115
00005 #define halfdrive 0.6
00006 
00007 
00008 Serial pc(SERIAL_TX, SERIAL_RX);
00009 
00010 AnalogIn ir1(PA_1);
00011 AnalogIn ir2(PA_4);
00012 AnalogIn ir3(PB_0);
00013 AnalogIn ir4(PC_1);
00014 AnalogIn ir5(PC_0);
00015  
00016 DigitalOut turnLeft(PA_10); //left turn
00017 DigitalOut turnRight(PA_8); //right turn
00018 DigitalOut back(PA_9); //reverse
00019 DigitalOut drive(PA_6); //forward
00020  
00021 bool setupFlag = false;
00022 SRF05 srf(PA_2, PA_3);
00023 
00024  
00025 enum direction{forward, backward, left = 77, right = 99, center = 88};
00026 enum trackersensor{sen1_left, sen2_left, sen3_mid, sen4_right, sen5_right};