try this for a change

Dependencies:   HIDScope MODSERIAL QEI biquadFilter mbed

Fork of EMG_5 by Ralph Gerlings

Revision:
11:ce72ec658a95
Parent:
10:09b8424a7b39
Child:
13:18d4cef1fdb4
--- a/main.cpp	Wed Sep 10 09:11:30 2014 +0000
+++ b/main.cpp	Thu Sep 11 07:16:24 2014 +0000
@@ -1,11 +1,13 @@
 #include "mbed.h"
 #include "MODSERIAL.h"
+#include "HIDScope.h"
 
 //Define objects
 AnalogIn    emg0(PTB1); //Analog input
 PwmOut      red(LED_RED); //PWM output
 Ticker log_timer;
 MODSERIAL pc(USBTX,USBRX);
+HIDScope scope(2);
 
 /** Looper function
 * functions used for Ticker and Timeout should be of type void <name>(void)
@@ -30,6 +32,9 @@
     /*send value to PC. Line below is used to prevent buffer overrun */
     if(pc.rxBufferGetSize(0)-pc.rxBufferGetCount() > 30)
         pc.printf("%u\n",emg_value);
+    scope.set(0,emg_value);
+    scope.set(1,red.read());
+    scope.send();
     /**When not using the LED, the above could also have been done this way:
     * pc.printf("%u\n", emg0.read_u16());
     */