how to control a servo

Dependencies:   Servo mbed

Fork of Servo_HelloWorld by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
mbedAustin
Date:
Sat May 28 08:46:38 2016 +0000
Parent:
3:67e0dff40e71
Child:
5:04e18a0d9dfb
Commit message:
updating code with a challenge

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat May 28 07:29:01 2016 +0000
+++ b/main.cpp	Sat May 28 08:46:38 2016 +0000
@@ -8,8 +8,9 @@
     for(float p=0; p<1.0; p += 0.1) {
         
         // YOUR CODE HERE: start the Servo
-        
+        myservo = p;
         
         wait(0.2);
+        // CHALLENGE: make code run between 0-1 only!
     }
 }