Hidscope + EMG
Dependencies: HIDScope biquadFilter mbed
main.cpp
- Committer:
- Iriskolenbrander9
- Date:
- 2018-10-22
- Revision:
- 0:5ad817857e29
- Child:
- 1:7eadfb7fd5c9
File content as of revision 0:5ad817857e29:
#include "mbed.h" #include "HIDScope.h" // Define the HIDScope and Ticker object HIDScope scope(2); Ticker scopeTimer; // Read the analog input AnalogIn emg1(A0); AnalogIn emg2(A1); // The data read and send function void scopeSend() { scope.set(0,emg1.read()); scope.set(1,emg2.read()); scope.send(); } int main() { // Attach the data read and send function at 100 Hz scopeTimer.attach_us(&scopeSend, 1e4); while(1) { } }