Running Motors

Dependencies:   Motor Servo mbed

Files at this revision

API Documentation at this revision

Comitter:
170198
Date:
Sat Oct 04 17:16:25 2014 +0000
Commit message:
Spinning the DC motors

Changed in this revision

Motor.lib Show annotated file Show diff for this revision Revisions of this file
Servo.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 5ae4f1df7dd7 Motor.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Motor.lib	Sat Oct 04 17:16:25 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/Motor/#f265e441bcd9
diff -r 000000000000 -r 5ae4f1df7dd7 Servo.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Servo.lib	Sat Oct 04 17:16:25 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/Servo/#36b69a7ced07
diff -r 000000000000 -r 5ae4f1df7dd7 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Oct 04 17:16:25 2014 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "Motor.h"
+#include "Servo.h"
+
+int main() {
+DigitalIn sw[4]={p16, p17, p18, p19};
+BusOut light(p5, p6, p7, p8, p11); 
+Motor dc_1(p26, p29, p30);
+Motor dc_2(p25, p27, p28);
+Servo motor_1(p21); 
+Servo motor_2(p22);
+int ted;
+int joe;
+joe=0;
+ted=0;
+    if (sw[0]==1)
+    {
+        ted=1;
+        dc_1.speed(ted);
+        joe=1;
+        dc_2.speed(joe);
+}
+
+
+
+}
diff -r 000000000000 -r 5ae4f1df7dd7 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Oct 04 17:16:25 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file