Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Arch_GPIO_Ex1 by
main.cpp
00001 #include "mbed.h" 00002 00003 /* Configure a GPIO pin as output for controlling a LED. 'led' is an user assigned name and 00004 'LED1' is an 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.write(1); // Here, DigitalOut -> write() function is used to set the ouput high. 00011 wait_ms(500); // Wait for 0.5 Seconds. The time is specified in milli-seconds using wait_ms() function. 00012 led.write(0); // Switch OFF the LED. 00013 wait_us(500000); // Wait for 0.5 Seconds. The time is specified in micro-seconds using wait_us() function. 00014 } 00015 }
Generated on Tue Jul 12 2022 17:49:49 by
