cool

Dependencies:   Motor Servo mbed

Revision:
0:af31e48dd848
Child:
1:50490d67ac7e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 03 19:00:30 2014 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "Motor.h"
+#include "Servo.h"
+
+Servo myservo1(p21); //declare servos
+Servo myservo2(p22);
+
+
+void opengate() // function to open the gate
+{
+    myservo1 = 1;
+    wait(0.5);
+}
+void closegate() //function to close the gate
+{
+    myservo1 = 0;
+    wait(0.5);
+}
+
+int main()
+{
+    opengate();
+    closegate();
+}