:)

Dependencies:   HIDScope MODSERIAL mbed-dsp mbed

Fork of emg_filter by Tanja H

Files at this revision

API Documentation at this revision

Comitter:
vsluiter
Date:
Thu Sep 11 07:16:24 2014 +0000
Parent:
10:09b8424a7b39
Child:
13:18d4cef1fdb4
Commit message:
Added HID Scope stuff

Changed in this revision

HIDScope.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HIDScope.lib	Thu Sep 11 07:16:24 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/tomlankhorst/code/HIDScope/#e44574634162
--- 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());
     */