![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Control up to two motors using filtered EMG signals and a PID controller
Dependencies: FastPWM HIDScope MODSERIAL QEI Matrix biquadFilter controller errorFetch mbed motorConfig refGen MatrixMath inverseKinematics
Fork of Minor_test_serial by
main.cpp@2:002f6b69ebaf, 2017-09-12 (annotated)
- Committer:
- tvlogman
- Date:
- Tue Sep 12 15:00:09 2017 +0000
- Revision:
- 2:002f6b69ebaf
- Parent:
- 1:40470bc517f1
- Child:
- 3:99a568200720
Added listener for keystroke which toggles LED and prints key to serial port;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
vsluiter | 0:c8f15874531b | 1 | #include "mbed.h" |
vsluiter | 0:c8f15874531b | 2 | #include "MODSERIAL.h" |
vsluiter | 0:c8f15874531b | 3 | |
vsluiter | 0:c8f15874531b | 4 | DigitalOut myled(LED_GREEN); |
vsluiter | 0:c8f15874531b | 5 | MODSERIAL pc(USBTX, USBRX); |
vsluiter | 0:c8f15874531b | 6 | |
vsluiter | 0:c8f15874531b | 7 | int main() |
vsluiter | 0:c8f15874531b | 8 | { |
tvlogman | 2:002f6b69ebaf | 9 | //int i = 0; |
vsluiter | 0:c8f15874531b | 10 | pc.baud(115200); |
Gijsvanoort | 1:40470bc517f1 | 11 | pc.printf("Hello World!\r\n"); |
vsluiter | 0:c8f15874531b | 12 | |
vsluiter | 0:c8f15874531b | 13 | while (true) { |
tvlogman | 2:002f6b69ebaf | 14 | pc.putc(pc.getc()); |
vsluiter | 0:c8f15874531b | 15 | myled = !myled; // toggle a led |
tvlogman | 2:002f6b69ebaf | 16 | |
vsluiter | 0:c8f15874531b | 17 | } |
vsluiter | 0:c8f15874531b | 18 | } |