Group 9 BioRobotics / Mbed 2 deprecated Servo_control

Dependencies:   Servo mbed

Files at this revision

API Documentation at this revision

Comitter:
s1574396
Date:
Wed Oct 31 11:19:11 2018 +0000
Child:
1:9b3491c0f6b8
Commit message:
Lijpe beweging van de servo

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	Wed Oct 31 11:19:11 2018 +0000
@@ -0,0 +1,1 @@
+http://os.mbed.com/users/simon/code/Servo/#36b69a7ced07
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Oct 31 11:19:11 2018 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+#include "Servo.h"
+
+//Ticker servo;
+//void signal_servo(){}
+
+
+Servo myservo(D7);
+DigitalIn but_1(SW2);
+
+void servocontrol()
+{
+    if (but_1)
+    {
+            myservo = 0.1;
+        }
+    else 
+    {
+            myservo = 0.0;
+        } 
+}
+ 
+int main() 
+{
+    while (1)
+    {
+        servocontrol();
+    wait(0.01);
+    }   
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Oct 31 11:19:11 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/abea610beb85
\ No newline at end of file