Seeedstudio Arch Examples : GPIO - DigitalIn example
Fork of Arch_GPIO_Ex2 by
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut led(LED1); // Configure LED1 pin as output 00004 DigitalIn button(P1_14); // Configure P1_14 pin as input 00005 00006 int main() 00007 { 00008 while(1) { 00009 led.write(button.read()); /* read the state of input port pin P1_14 and write it to output port pin LED1*/ 00010 } 00011 }
Generated on Tue Jul 12 2022 17:49:49 by 1.7.2