Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Kaikestu
Date:
Wed Jan 27 11:55:24 2010 +0000
Commit message:

Changed in this revision

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/main.cpp	Wed Jan 27 11:55:24 2010 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+#include "Servo.h"
+
+DigitalOut myled(LED2);
+Servo motor (p21);
+
+int main() {
+
+int b = 0;
+
+while (b !=2 ){
+
+    motor.write(0.5);
+    wait(3);
+    
+    motor.write(0); //full forward
+    wait(1);
+    motor.write(0.5);
+    wait(1);
+    myled = 1;
+    
+    wait(2);
+    
+    motor.write(0.88); //full bacward     
+    wait(5);
+    motor.write(0.5);
+    wait(1);
+    myled = 0;
+    
+    b = 2;
+}
+
+    while(1) {//FIN
+        myled = 1;
+        wait(0.2);
+        myled = 0;
+        wait(0.2);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jan 27 11:55:24 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0