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.
Diff: pins.cpp
- Revision:
- 4:48d390356fba
- Parent:
- 3:c9df852ad9ac
diff -r c9df852ad9ac -r 48d390356fba pins.cpp --- a/pins.cpp Wed Feb 21 11:55:29 2018 +0000 +++ b/pins.cpp Thu Feb 22 17:01:00 2018 +0000 @@ -4,6 +4,7 @@ #include "pins.h" #include "QEI.h" #include "constants.cpp" +#include "C12832.h" //Encoder pins (created as a QEI object, so just defined naming for pins) //======================= #define channelARight PB_1 @@ -16,20 +17,21 @@ QEI encoderLeft(channelALeft, channelBLeft, channelILeft, ENCODER_PULSE); //Motor control pins //======================= -PwmOut motorRight(PB_6); -PwmOut motorLeft(PB_7); -DigitalOut motorDirRight(PB_4); +PwmOut motorRight(PB_7); +PwmOut motorLeft(PC_8); +DigitalOut motorDirRight(PH_0); DigitalOut motorDirLeft(PB_5); -DigitalOut motorModeRight(PB_2); -DigitalOut motorModeLeft(PB_3); -DigitalOut driveBoard (PB_1); +DigitalOut motorModeRight(PC_15); +DigitalOut motorModeLeft(PB_4); +DigitalOut driveBoard (PB_2); //Line sensor pins //======================= //UI pins(setup for control) //======================= -AnalogIn potLeft(PA_0); -AnalogIn potRight(PA_1); -DigitalIn joystickCentre(PB_5); +C12832 lcd(D11, D13, D12, D7, D10); +AnalogIn potentiometerLeft(PA_1); +AnalogIn potentiometerRight(PA_0); +DigitalIn joystickCentre(PB_10); DigitalIn joystickDown(PB_0); //Magnet sensor pins //=======================