Visweswara R
/
Arch_GPIO_Ex1
Seeedstudio Arch Examples : GPIO - Blinking LED
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 00003 /* Configure a GPIO pin as output for controlling a LED. 'led' is user assigned name and 00004 'LED1' is a internal name given to a port pin P1_8 in this Arch platform. */ 00005 DigitalOut led(LED1); 00006 00007 int main() 00008 { 00009 while(1) { 00010 led = 1; // Switch ON the LED. 00011 wait(0.5); // Wait for 0.5 Seconds. 00012 led = 0; // Switch OFF the LED. 00013 wait(0.5); // Wait for 0.5 Seconds. 00014 } 00015 }
Generated on Tue Jul 12 2022 17:49:48 by 1.7.2