Biorobotica TIC / Mbed 2 deprecated Servo

Dependencies:   Servo mbed biquadFilter

Revision:
2:80d4ea87a2bb
Parent:
1:93a041e62d7e
--- a/main.cpp	Mon Oct 08 12:59:46 2018 +0000
+++ b/main.cpp	Mon Oct 08 13:36:05 2018 +0000
@@ -1,24 +1,29 @@
 // Continuously sweep the servo through it's full range
 #include "mbed.h"
 #include "Servo.h"
+#include "MODSERIAL.h"
  
 Servo myservo(D7);
 InterruptIn button(PTA4);
 //InterruptIn button1(PTC6);
 //DigitalOut myledgreen(LED_GREEN);
 //DigitalOut myledred(LED_RED);
+MODSERIAL pc(USBTX, USBRX);
 
 
 
 
 int main() {
+    pc.baud(115200);
     while(1) {
         
+        char c;
+        c = pc.getc();
       // Met een switch
       
-    switch(button)
+    switch(c)
     { 
-        case 0:
+        case 'h':
         myservo = 0.5;
         wait(0.01);
         break;