hidscope herkent m'n device niet.
Dependencies: HIDScope mbed biquadFilter
main.cpp@0:e7f5d0b44e22, 2016-10-20 (annotated)
- Committer:
- Jankoekenpan
- Date:
- Thu Oct 20 10:20:58 2016 +0000
- Revision:
- 0:e7f5d0b44e22
- Child:
- 1:d357a1e80389
hidscope is kut
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jankoekenpan | 0:e7f5d0b44e22 | 1 | #include "mbed.h" |
Jankoekenpan | 0:e7f5d0b44e22 | 2 | #include "HIDScope.h" |
Jankoekenpan | 0:e7f5d0b44e22 | 3 | |
Jankoekenpan | 0:e7f5d0b44e22 | 4 | |
Jankoekenpan | 0:e7f5d0b44e22 | 5 | AnalogIn emg1(A1); |
Jankoekenpan | 0:e7f5d0b44e22 | 6 | AnalogIn emg2(A2); |
Jankoekenpan | 0:e7f5d0b44e22 | 7 | HIDScope scope(1); |
Jankoekenpan | 0:e7f5d0b44e22 | 8 | Ticker ticker; |
Jankoekenpan | 0:e7f5d0b44e22 | 9 | |
Jankoekenpan | 0:e7f5d0b44e22 | 10 | void tick() { |
Jankoekenpan | 0:e7f5d0b44e22 | 11 | scope.set(0, emg1.read()); |
Jankoekenpan | 0:e7f5d0b44e22 | 12 | scope.set(1, emg2.read()); |
Jankoekenpan | 0:e7f5d0b44e22 | 13 | scope.send(); |
Jankoekenpan | 0:e7f5d0b44e22 | 14 | } |
Jankoekenpan | 0:e7f5d0b44e22 | 15 | |
Jankoekenpan | 0:e7f5d0b44e22 | 16 | int main() |
Jankoekenpan | 0:e7f5d0b44e22 | 17 | { |
Jankoekenpan | 0:e7f5d0b44e22 | 18 | ticker.attach(&tick, 1/1200); |
Jankoekenpan | 0:e7f5d0b44e22 | 19 | while (true); |
Jankoekenpan | 0:e7f5d0b44e22 | 20 | } |