Seeedstudio Arch Examples : GPIO - BusOut example

Dependencies:   mbed

Fork of Arch_GPIO_Ex3 by Visweswara R

Committer:
viswesr
Date:
Thu Sep 05 02:19:37 2013 +0000
Revision:
0:ed40790a022a
Child:
1:3c5f838ae76d
First version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
viswesr 0:ed40790a022a 1 #include "mbed.h"
viswesr 0:ed40790a022a 2
viswesr 0:ed40790a022a 3 /* Configure a GPIO pin as output for controlling a LED. 'led' is user assigned name and
viswesr 0:ed40790a022a 4 'LED1' is a internal name given to a port pin P1_8 in this Arch platform. */
viswesr 0:ed40790a022a 5 DigitalOut led(LED1);
viswesr 0:ed40790a022a 6
viswesr 0:ed40790a022a 7 int main()
viswesr 0:ed40790a022a 8 {
viswesr 0:ed40790a022a 9 while(1) {
viswesr 0:ed40790a022a 10 led = 1; // Switch ON the LED.
viswesr 0:ed40790a022a 11 wait(0.5); // Wait for 0.5 Seconds.
viswesr 0:ed40790a022a 12 led = 0; // Switch OFF the LED.
viswesr 0:ed40790a022a 13 wait(0.5); // Wait for 0.5 Seconds.
viswesr 0:ed40790a022a 14 }
viswesr 0:ed40790a022a 15 }