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: mbed QEI HIDScope biquadFilter MODSERIAL FastPWM
main.cpp@3:766c85141f33, 2019-09-09 (annotated)
- Committer:
- IslamKhalil
- Date:
- Mon Sep 09 10:39:34 2019 +0000
- Revision:
- 3:766c85141f33
- Parent:
- 2:cd67be02b1f7
- Child:
- 4:90ea97188542
template biorobotics with non-blocking serial communication
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| RobertoO | 0:67c50348f842 | 1 | #include "mbed.h" | 
| IslamKhalil | 2:cd67be02b1f7 | 2 | #include "HIDScope.h" | 
| IslamKhalil | 2:cd67be02b1f7 | 3 | #include "QEI.h" | 
| RobertoO | 1:b862262a9d14 | 4 | #include "MODSERIAL.h" | 
| IslamKhalil | 2:cd67be02b1f7 | 5 | #include "BiQuad.h" | 
| IslamKhalil | 2:cd67be02b1f7 | 6 | #include "FastPWM.h" | 
| RobertoO | 0:67c50348f842 | 7 | |
| IslamKhalil | 3:766c85141f33 | 8 | DigitalOut led(LED_BLUE) ; | 
| IslamKhalil | 3:766c85141f33 | 9 | DigitalIn sw2(SW2) ; | 
| IslamKhalil | 3:766c85141f33 | 10 | MODSERIAL pc(USBTX, USBRX) ; | 
| RobertoO | 0:67c50348f842 | 11 | |
| RobertoO | 0:67c50348f842 | 12 | int main() | 
| RobertoO | 0:67c50348f842 | 13 | { | 
| IslamKhalil | 3:766c85141f33 | 14 | pc.baud(115200) ; | 
| IslamKhalil | 3:766c85141f33 | 15 | pc.printf("\r\nStarting...\r\n\r\n") ; | 
| RobertoO | 0:67c50348f842 | 16 | |
| RobertoO | 0:67c50348f842 | 17 | while (true) { | 
| RobertoO | 0:67c50348f842 | 18 | |
| IslamKhalil | 3:766c85141f33 | 19 | led = !led ; | 
| IslamKhalil | 3:766c85141f33 | 20 | wait_ms(1000) ; | 
| IslamKhalil | 3:766c85141f33 | 21 | char c ; | 
| IslamKhalil | 3:766c85141f33 | 22 | c = pc.getcNb() ; | 
| IslamKhalil | 3:766c85141f33 | 23 | pc.putc(c) ; | 
| RobertoO | 0:67c50348f842 | 24 | } | 
| RobertoO | 0:67c50348f842 | 25 | } |