Programming Milestone Group 7 BMT M9

Dependencies:   FastPWM MODSERIAL mbed

Files at this revision

API Documentation at this revision

Comitter:
MAHCSnijders
Date:
Wed Sep 26 17:05:33 2018 +0000
Parent:
5:92360cb2e0e4
Commit message:
FINAL VERSION; Aansluitingen:; Motor 1 aansluiten op M1; Motor 2 aansluiten op M2; Stroomkabels; POT1 naar A2; POT2 naar A4

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
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;