Seeedstudio Arch Examples : GPIO - BusOut example

Dependencies:   mbed

Fork of Arch_GPIO_Ex3 by Visweswara R

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 BusOut onboardLEDs(P1_8,P1_9,P1_10,P1_11); /*P1_8 - P1_11 are LED1 - LED4*/
00004 
00005 int main()
00006 {
00007     int i;
00008     while(1) {
00009         for(i=0; i<16; i++) {
00010             onboardLEDs.write(i); /* LED1 is LSB  and LED4 is MSB*/
00011             wait(0.5);
00012         }
00013 
00014     }
00015 }