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: ExperimentServer QEI_pmw MotorShield
Diff: main.cpp
- Revision:
- 15:495333b2ccf1
- Parent:
- 14:c0aa529968a2
- Child:
- 16:f9ea2b2d410f
diff -r c0aa529968a2 -r 495333b2ccf1 main.cpp
--- a/main.cpp Wed Aug 26 23:42:18 2020 +0000
+++ b/main.cpp Thu Aug 27 14:55:58 2020 +0000
@@ -44,8 +44,11 @@
encoderC.reset();
encoderD.reset();
- motorShield.motorAWrite(0, 0); //turn motor A off, motorShield.motorAWrite(DUTY CYCLE, DIRECTION), DIRECTION = 0 is forward
-
+ motorShield.motorAWrite(0, 0); //turn motor A off
+
+ //use the motor shield as follows:
+ //motorShield.motorAWrite(DUTY CYCLE, DIRECTION), DIRECTION = 0 is forward, DIRECTION =1 is backwards.
+
// Run experiment
while( t.read() < 2 ) {
// Perform control loop logic