Reference file for DC Motor testing.

Dependencies:   Motor mbed

Files at this revision

API Documentation at this revision

Comitter:
christianjaunich
Date:
Thu Oct 02 14:35:51 2014 +0000
Commit message:
Reference File for testing

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Motor.lib	Thu Oct 02 14:35:51 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/Motor/#f265e441bcd9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 02 14:35:51 2014 +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);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 02 14:35:51 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file