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: Motordriver mbed
Revision 0:a05a28ae0c99, committed 2017-02-08
- Comitter:
- macenzofan
- Date:
- Wed Feb 08 21:45:46 2017 +0000
- Commit message:
- ECE 4180 Dancing robot demo
Changed in this revision
diff -r 000000000000 -r a05a28ae0c99 Motordriver.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motordriver.lib Wed Feb 08 21:45:46 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/littlexc/code/Motordriver/#3110b9209d3c
diff -r 000000000000 -r a05a28ae0c99 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Feb 08 21:45:46 2017 +0000
@@ -0,0 +1,28 @@
+// test code, this demonstrates working motor drivers.
+// full reverse to full stop, dynamicaly brake and switch off.
+#include "motordriver.h"
+Motor A(p25, p20, p19, 1); // pwm, fwd, rev, can brake
+Motor B(p24, p18, p17, 1); // pwm, fwd, rev, can brake
+
+int main() {
+ for (float s= -1.0; s < 1.0 ; s += 0.01) {
+ A.speed(s);
+ B.speed(s);
+ wait(0.02);
+ }
+ A.stop(1.0);
+ B.stop(1.0);
+ wait(1);
+ A.coast();
+ B.coast();
+ for (float s= -1.0; s < 1.0 ; s += 0.01) {
+ A.speed(s);
+ B.speed(-s);
+ wait(0.02);
+ }
+ A.stop(1.0);
+ B.stop(1.0);
+ wait(1);
+ A.coast();
+ B.coast();
+}
\ No newline at end of file
diff -r 000000000000 -r a05a28ae0c99 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Feb 08 21:45:46 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/176b8275d35d \ No newline at end of file