
Seeedstudio Arch Examples : GPIO - BusOut example
Fork of Arch_GPIO_Ex3 by
main.cpp@4:ba523da0d68a, 2013-09-17 (annotated)
- Committer:
- viswesr
- Date:
- Tue Sep 17 01:56:36 2013 +0000
- Revision:
- 4:ba523da0d68a
- Parent:
- 3:a72374052938
BusOut Example : First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
viswesr | 0:ed40790a022a | 1 | #include "mbed.h" |
viswesr | 0:ed40790a022a | 2 | |
viswesr | 4:ba523da0d68a | 3 | BusOut onboardLEDs(P1_8,P1_9,P1_10,P1_11); /*P1_8 - P1_11 are LED1 - LED4*/ |
viswesr | 0:ed40790a022a | 4 | |
viswesr | 0:ed40790a022a | 5 | int main() |
viswesr | 0:ed40790a022a | 6 | { |
viswesr | 4:ba523da0d68a | 7 | int i; |
viswesr | 0:ed40790a022a | 8 | while(1) { |
viswesr | 4:ba523da0d68a | 9 | for(i=0; i<16; i++) { |
viswesr | 4:ba523da0d68a | 10 | onboardLEDs.write(i); /* LED1 is LSB and LED4 is MSB*/ |
viswesr | 4:ba523da0d68a | 11 | wait(0.5); |
viswesr | 4:ba523da0d68a | 12 | } |
viswesr | 4:ba523da0d68a | 13 | |
viswesr | 0:ed40790a022a | 14 | } |
viswesr | 0:ed40790a022a | 15 | } |