Programming Milestone Group 7 BMT M9
Dependencies: FastPWM MODSERIAL mbed
Diff: main.cpp
- Revision:
- 6:b5fc5007f228
- Parent:
- 5:92360cb2e0e4
diff -r 92360cb2e0e4 -r b5fc5007f228 main.cpp --- a/main.cpp Wed Sep 26 16:41:28 2018 +0000 +++ b/main.cpp Wed Sep 26 17:05:33 2018 +0000 @@ -7,8 +7,8 @@ FastPWM pwmpin2(D6); // SPECIFIC PIN (hoeft niet aangesloten te worden) Tells you how fast the motor has to go (later: pwmpin.write will tell you the duty cycle, aka how much voltage the motor gets) DigitalOut directionpin1(D4); // SPECIFIC PIN (hoeft niet aangesloten te worden) Direction value (0-1) that the mbed will give the motor: in which direction the motor must rotate DigitalOut directionpin2(D7); // SPECIFIC PIN (hoeft niet aangesloten te worden) Direction value (0-1) that the mbed will give the motor: in which direction the motor must rotate -AnalogIn potmeter1(A0); // Analoge input van potmeter 1 -AnalogIn potmeter2(A1); // Analoge input van potmeter 2 +AnalogIn potmeter1(A4); // Analoge input van potmeter 1 -> Motor 1 +AnalogIn potmeter2(A2); // Analoge input van potmeter 2 -> Motor 2 volatile float pot1; volatile float pot2;