ECE 4180 Lab 2 Servo

Dependencies:   Servo mbed

Fork of Servo_HelloWorld by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
dhcabinian
Date:
Mon Feb 15 17:36:42 2016 +0000
Parent:
1:40d2fd0b99e6
Commit message:
4180L2_Servo;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 40d2fd0b99e6 -r a972a1a76954 main.cpp
--- a/main.cpp	Tue Nov 23 16:10:35 2010 +0000
+++ b/main.cpp	Mon Feb 15 17:36:42 2016 +0000
@@ -10,4 +10,11 @@
         myservo = p;
         wait(0.2);
     }
+    
+    wait(10);
+    
+    for(float p=1.0; p>=0; p -= 0.2) {
+        myservo = p;
+        wait(0.2);
+    }
 }