asdf

Dependencies:   Servo mbed

Files at this revision

API Documentation at this revision

Comitter:
TheDoctor822
Date:
Mon Apr 18 01:38:56 2016 +0000
Commit message:
Lab 7 part 3

Changed in this revision

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Servo.lib	Mon Apr 18 01:38:56 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/Servo/#36b69a7ced07
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Apr 18 01:38:56 2016 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "Servo.h"
+
+Serial pc(USBTX, USBRX); // tx, rx
+
+Servo myservo( p21 );
+
+main(){
+    myservo.calibrate( .0009, 90 );
+    float i;
+    
+    myservo = 0;
+    while(1){
+        
+        for(i = 0; i < 1.0; i += 0.0555 ) {
+            myservo = i;
+            wait(.2777);
+        }
+        
+    myservo = 1;
+        for(i = 1.0; i > 0.0; i -= 0.0555 ) {
+            myservo = i;
+            wait(.2777);
+        }        
+    
+    }
+  
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Apr 18 01:38:56 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/252557024ec3
\ No newline at end of file