IOP WIZnet
/
ledtest_wiznetacademy
test
main.cpp@0:4e9df6d4c5ff, 2017-05-11 (annotated)
- Committer:
- IOP
- Date:
- Thu May 11 02:32:14 2017 +0000
- Revision:
- 0:4e9df6d4c5ff
led ?????
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
IOP | 0:4e9df6d4c5ff | 1 | #include "mbed.h" |
IOP | 0:4e9df6d4c5ff | 2 | |
IOP | 0:4e9df6d4c5ff | 3 | // PC_8 = RED |
IOP | 0:4e9df6d4c5ff | 4 | // PC_9 = GREEN |
IOP | 0:4e9df6d4c5ff | 5 | // PC_5 = BLUE |
IOP | 0:4e9df6d4c5ff | 6 | |
IOP | 0:4e9df6d4c5ff | 7 | DigitalOut RED(PC_8); |
IOP | 0:4e9df6d4c5ff | 8 | DigitalOut GREEN(PC_9); |
IOP | 0:4e9df6d4c5ff | 9 | DigitalOut BLUE(PC_5); |
IOP | 0:4e9df6d4c5ff | 10 | |
IOP | 0:4e9df6d4c5ff | 11 | int main(void) |
IOP | 0:4e9df6d4c5ff | 12 | { |
IOP | 0:4e9df6d4c5ff | 13 | while(1) |
IOP | 0:4e9df6d4c5ff | 14 | { |
IOP | 0:4e9df6d4c5ff | 15 | RED = 1; |
IOP | 0:4e9df6d4c5ff | 16 | GREEN = 1; |
IOP | 0:4e9df6d4c5ff | 17 | BLUE =1; |
IOP | 0:4e9df6d4c5ff | 18 | wait(1); |
IOP | 0:4e9df6d4c5ff | 19 | RED = 0; |
IOP | 0:4e9df6d4c5ff | 20 | GREEN = 0; |
IOP | 0:4e9df6d4c5ff | 21 | BLUE = 0; |
IOP | 0:4e9df6d4c5ff | 22 | wait(1); |
IOP | 0:4e9df6d4c5ff | 23 | } |
IOP | 0:4e9df6d4c5ff | 24 | } |