Code ServoMotor

Dependencies:   Servo mbed

Fork of Servo_HelloWorld by Simon Ford

Revision:
2:e917f9bc829b
Parent:
1:40d2fd0b99e6
--- a/main.cpp	Tue Nov 23 16:10:35 2010 +0000
+++ b/main.cpp	Fri Oct 14 13:19:46 2016 +0000
@@ -1,13 +1,13 @@
-// Hello World to sweep a servo through its full range
 
 #include "mbed.h"
 #include "Servo.h"
 
-Servo myservo(p21);
+Servo myservo(D8);
 
 int main() {    
-    for(float p=0; p<1.0; p += 0.1) {
-        myservo = p;
-        wait(0.2);
-    }
+  //      for(float p=0; p<1.0; p += 0.1) {
+  //          myservo = p;
+  //          wait(0.2);
+    myservo = 0.5; 
 }
+