Hello

Dependencies:   Motor Servo mbed

Revision:
0:d07fffb33419
--- /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;
+                
+            }
+        }
+    }
+}
+
+
+