Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 10:4a825f818432
- Parent:
- 9:76e4808df4cb
--- a/main.cpp Fri Dec 01 21:20:29 2017 +0000 +++ b/main.cpp Thu Apr 05 21:21:51 2018 +0000 @@ -1,27 +1,29 @@ + + #include "mbed.h" #include "PID.h" #include "controls.h" #include "globals.h" -AnalogIn LL_t (PC_0); -AnalogIn L_t (PC_1); -AnalogIn R_t (PA_4); -AnalogIn RR_t (PA_0); +AnalogIn LL_t (PA_5); +AnalogIn L_t (PA_7); +AnalogIn R_t (PB_0); +AnalogIn RR_t (PB_1); -DigitalOut LL_e (PB_7); -DigitalOut L_e (PB_0); -DigitalOut R_e (PC_11); -DigitalOut RR_e (PC_10); +DigitalOut LL_e (PC_0); +DigitalOut L_e (PC_1); +DigitalOut R_e (PC_2); +DigitalOut RR_e (PC_3); -InterruptIn cM1_1(PB_3); //interrupt from encoders -InterruptIn cM1_2(PA_15); -InterruptIn cM2_1(PA_1); -InterruptIn cM2_2(PC_4); +InterruptIn cM1_1(PA_5); //interrupt from encoders +InterruptIn cM1_2(PB_3); +InterruptIn cM2_1(PA_0); +InterruptIn cM2_2(PA_1); PwmOut M1F(PC_7); //motor direction and speed control -PwmOut M2B(PA_7); -PwmOut M1B(PB_10); -PwmOut M2F(PB_6); +PwmOut M1B(PC_6); +PwmOut M2F(PC_9); +PwmOut M2B(PC_8); Serial pc(SERIAL_TX, SERIAL_RX); volatile unsigned long counterM1 = 1; // counter for hall sensors