checkje

Dependencies:   HIDScope MODSERIAL mbed

Fork of EMG by Tom Tom

Files at this revision

API Documentation at this revision

Comitter:
daniQQue
Date:
Fri Oct 28 08:20:21 2016 +0000
Parent:
22:10f62c4f88eb
Commit message:
hidscope test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 10f62c4f88eb -r 7de28be57d75 main.cpp
--- a/main.cpp	Fri Oct 21 11:21:55 2016 +0000
+++ b/main.cpp	Fri Oct 28 08:20:21 2016 +0000
@@ -1,6 +1,6 @@
 #include "mbed.h"
 #include "HIDScope.h"
-
+#include "MODSERIAL.h"
 //Define objects
 AnalogIn    emg0( A0 );
 AnalogIn    emg1( A1 );
@@ -8,6 +8,7 @@
 Ticker      sample_timer;
 HIDScope    scope( 2 );
 DigitalOut  led(LED1);
+MODSERIAL   pc(USBTX,USBRX);
 
 /** Sample function
  * this function samples the emg and sends it to HIDScope
@@ -23,6 +24,7 @@
     scope.send();
     /* To indicate that the function is working, the LED is toggled */
     led = !led;
+    pc.printf("send\r\n");
 }
 
 int main()
@@ -30,8 +32,10 @@
     /**Attach the 'sample' function to the timer 'sample_timer'.
     * this ensures that 'sample' is executed every... 0.002 seconds = 500 Hz
     */
+    
+    pc.baud(115200);   
     sample_timer.attach(&sample, 0.001);
-
+    
     /*empty loop, sample() is executed periodically*/
     while(1) {}
 }
\ No newline at end of file