checkje
Dependencies: HIDScope MODSERIAL mbed
Fork of EMG by
Diff: main.cpp
- Revision:
- 21:6152d0c75aa6
- Parent:
- 20:97059009a491
- Child:
- 22:10f62c4f88eb
--- a/main.cpp Thu Sep 22 08:53:50 2016 +0000 +++ b/main.cpp Fri Oct 21 11:19:50 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 */ - sample_timer.attach(&sample, 0.002); - + + pc.baud(115200); + sample_timer.attach(&sample, 0.001); + /*empty loop, sample() is executed periodically*/ while(1) {} } \ No newline at end of file