Sam Chu
/
frdm_test
test program for demo
main.cpp@0:333c69338ddf, 2018-04-16 (annotated)
- Committer:
- Sam_Chu
- Date:
- Mon Apr 16 09:05:50 2018 +0000
- Revision:
- 0:333c69338ddf
frdm_test_demo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Sam_Chu | 0:333c69338ddf | 1 | #include "mbed.h" |
Sam_Chu | 0:333c69338ddf | 2 | |
Sam_Chu | 0:333c69338ddf | 3 | DigitalOut led1(LED1); |
Sam_Chu | 0:333c69338ddf | 4 | |
Sam_Chu | 0:333c69338ddf | 5 | // main() runs in its own thread in the OS |
Sam_Chu | 0:333c69338ddf | 6 | int main() { |
Sam_Chu | 0:333c69338ddf | 7 | while (true) { |
Sam_Chu | 0:333c69338ddf | 8 | led1 = !led1; |
Sam_Chu | 0:333c69338ddf | 9 | wait(0.5); |
Sam_Chu | 0:333c69338ddf | 10 | } |
Sam_Chu | 0:333c69338ddf | 11 | } |