Inverted Pendulum / Mbed 2 deprecated IP-Interface

Dependencies:   mbed QEI

Revision:
3:1b3354f31db4
Parent:
2:67cf01beacc1
diff -r 67cf01beacc1 -r 1b3354f31db4 MagneticEncoder.cpp
--- a/MagneticEncoder.cpp	Fri Nov 11 00:54:37 2016 +0000
+++ b/MagneticEncoder.cpp	Fri Nov 11 01:11:46 2016 +0000
@@ -5,13 +5,14 @@
 DigitalOut myled(LED1);
 
 int main() {
-    
+    pc.baud(9600);
     mypwm.period_ms(10);
     mypwm.pulsewidth_ms(1);
   
-    serial.printf("pwm set to %.2f %%\n", mypwm.read() * 100);
+    
     
     while(1) {
+        serial.printf("pwm set to %.2f %%\n", mypwm.read() * 100);
         myled = !myled;
         wait(1);
     }