kwangje jo
/
mbed_blinky
led
main.cpp@1:883bcb081bf0, 2015-07-07 (annotated)
- Committer:
- genebe25
- Date:
- Tue Jul 07 11:34:16 2015 +0000
- Revision:
- 1:883bcb081bf0
- Parent:
- 0:31408c00a214
slow
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
genebe25 | 0:31408c00a214 | 1 | #include "mbed.h" |
genebe25 | 0:31408c00a214 | 2 | |
genebe25 | 0:31408c00a214 | 3 | DigitalOut myled(LED1); |
genebe25 | 0:31408c00a214 | 4 | DigitalOut myled2(LED2); |
genebe25 | 0:31408c00a214 | 5 | int main() { |
genebe25 | 0:31408c00a214 | 6 | while(1) { |
genebe25 | 0:31408c00a214 | 7 | myled = 1; |
genebe25 | 1:883bcb081bf0 | 8 | myled2 = 0; |
genebe25 | 0:31408c00a214 | 9 | |
genebe25 | 1:883bcb081bf0 | 10 | wait(0.5); |
genebe25 | 0:31408c00a214 | 11 | myled = 0; |
genebe25 | 1:883bcb081bf0 | 12 | myled2 = 1; |
genebe25 | 1:883bcb081bf0 | 13 | wait(0.5); |
genebe25 | 0:31408c00a214 | 14 | } |
genebe25 | 0:31408c00a214 | 15 | } |