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.
Dependencies: mbed
main.cpp
00001 #include "mbed.h" 00002 00003 Serial pc(D1,D0); // Configure LED1 pin as output 00004 DigitalIn button1(D2); 00005 DigitalIn button2(D3); // Configure P1_14 pin as input 00006 00007 int main() 00008 { 00009 while(1) { 00010 if(button1 == 1){pc.printf("1HIGH\n");} 00011 if(button2 == 0){pc.printf("1LOW\n");} 00012 if(button2 == 1){pc.printf("2HIGH\n");} 00013 if(button2 == 0){pc.printf("2LOW\n");} /* read the state of input pin P1_14 and write it to output port pin LED1*/ 00014 } 00015 }
Generated on Thu Aug 18 2022 07:19:08 by
1.7.2