Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope mbed MODSERIAL QEI
main.cpp
- Committer:
- john111222333
- Date:
- 2017-10-17
- Revision:
- 7:c17f5473f4e1
- Parent:
- 6:452e301a105a
- Child:
- 8:0b7925095416
File content as of revision 7:c17f5473f4e1:
#include "EMG.h" #include "Motor.h" #include "HIDScope.h" #include "MODSERIAL.h" //Initialize Analog EMG inputs EMG EMG_bi_r(A0); EMG EMG_bi_l(A1); EMG EMG_tri_r(A2); EMG EMG_tri_l(A3); HIDScope scope(1); // 4 channels of data Ticker MainTicker; MODSERIAL pc(USBTX, USBRX); const double sample_time= 0.002; //fs = 500Hz void ReadAndFilterEMG() { scope.set(0, EMG_bi_r.filter()); scope.send(); /*****/ } int main(void) { pc.baud(115200); //Set Baud rate for Serial communication MainTicker.attach(&ReadAndFilterEMG, sample_time); //Attach time based interrupt /* while(true) { } */ return 0; }