DC Motor test

Dependencies:   Motor mbed

Files at this revision

API Documentation at this revision

Comitter:
mbedschool
Date:
Thu Feb 05 12:57:10 2015 +0000
Commit message:
test

Changed in this revision

Motor.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r c964b537b7ff Motor.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Motor.lib	Thu Feb 05 12:57:10 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/Motor/#f265e441bcd9
diff -r 000000000000 -r c964b537b7ff main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Feb 05 12:57:10 2015 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+#include "Motor.h"
+
+Motor motor1(p26,p29,p30);
+
+int main()
+{
+    float motorspeed;
+    for (motorspeed=-1.0;motorspeed<=1.0;motorspeed+=.2)
+    {
+        motor1.speed(motorspeed);
+        printf("Motor speed is %.2f\n",motorspeed);
+        getchar();
+    }
+    motor1.speed(0.0);
+}
diff -r 000000000000 -r c964b537b7ff mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Feb 05 12:57:10 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e188a91d3eaa
\ No newline at end of file