this code is completely restructured, but should do the same thing. did not want to directly commit, since it may not work at all. compiles though.
Dependencies: AVEncoder mbed-src-AV
Fork of Test by
pinouts.cpp
00001 #include "mouse.h" 00002 #include "pinouts.h" 00003 00004 #include "AVEncoder.h" 00005 #include "mbed.h" 00006 00007 Serial pc(SERIAL_TX, SERIAL_RX); 00008 00009 PwmOut right_forward(PB_10); 00010 PwmOut right_reverse(PA_6); 00011 PwmOut left_forward(PA_7); 00012 PwmOut left_reverse(PB_6); 00013 00014 // TODO: change our encoder pins from AnalogIn into: 00015 // otherwise, we can also use the AVEncoder thing as well. 00016 AVEncoder l_enco(PA_15, PB_3); 00017 AVEncoder r_enco(PA_1, PA_10); 00018 00019 // gyro 00020 AnalogIn _gyro(PA_0); 00021 // AnalogIn gyro_cal(PC_1) ?? currently this isn't connected. 00022 00023 //Left Front IR 00024 DigitalOut eLF(PC_3); 00025 AnalogIn rLF(PC_0); 00026 //PC_4 is an ADC 00027 //Left Side IR 00028 DigitalOut eLS(PC_2); 00029 AnalogIn rLS(PC_1); 00030 00031 //Right Side IR 00032 DigitalOut eRS(PC_12); 00033 AnalogIn rRS(PA_4); 00034 00035 //Right Front IR 00036 DigitalOut eRF(PC_15); 00037 AnalogIn rRF(PB_0); 00038 00039 DigitalOut myled(LED1);
Generated on Tue Jul 12 2022 23:49:37 by 1.7.2