Hello

Dependencies:   Motor Servo mbed

Files at this revision

API Documentation at this revision

Comitter:
m174770
Date:
Thu Oct 09 15:31:19 2014 +0000
Commit message:
Kill

Changed in this revision

Motor.lib Show annotated file Show diff for this revision Revisions of this file
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/Motor.lib	Thu Oct 09 15:31:19 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/Motor/#f265e441bcd9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Servo.lib	Thu Oct 09 15:31:19 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/Tyfighters/code/Servo/#507223a4cf0e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 09 15:31:19 2014 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+#include "Servo.h"
+#include "Motor.h"
+
+Servo myservo1(p22);                        //inititalize motors and servo
+DigitalIn sw2(p17);
+DigitalIn sw3(p18);
+
+
+int main()
+{
+    float servopos; //current position of servos
+    float waittime=0.02;
+    while(1) {
+        if(sw2==1) {
+            servopos=0.5;
+            while(sw2==1) {
+                servopos+=0.0025;
+                wait(waittime);
+                myservo1=servopos;
+                
+            }
+        }
+        if(sw3==1) {
+            servopos=myservo1;
+
+            while(sw3==1) {
+                servopos-=0.0025;
+                wait(waittime);
+                myservo1=servopos;
+                
+            }
+        }
+    }
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 09 15:31:19 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file