![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
test
main.cpp@0:18a84a3c1ceb, 2018-11-28 (annotated)
- Committer:
- mate57740
- Date:
- Wed Nov 28 20:53:16 2018 +0000
- Revision:
- 0:18a84a3c1ceb
ggg
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mate57740 | 0:18a84a3c1ceb | 1 | #include "mbed.h" |
mate57740 | 0:18a84a3c1ceb | 2 | |
mate57740 | 0:18a84a3c1ceb | 3 | DigitalOut myled(LED1); |
mate57740 | 0:18a84a3c1ceb | 4 | |
mate57740 | 0:18a84a3c1ceb | 5 | int main() { |
mate57740 | 0:18a84a3c1ceb | 6 | while(1) { |
mate57740 | 0:18a84a3c1ceb | 7 | myled = 1; // LED is ON |
mate57740 | 0:18a84a3c1ceb | 8 | wait(0.2); // 200 ms |
mate57740 | 0:18a84a3c1ceb | 9 | myled = 0; // LED is OFF |
mate57740 | 0:18a84a3c1ceb | 10 | wait(1.0); // 1 sec |
mate57740 | 0:18a84a3c1ceb | 11 | } |
mate57740 | 0:18a84a3c1ceb | 12 | } |