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.
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut out(PA_14); 00004 DigitalOut myled(LED1); 00005 DigitalIn in(PA_13); 00006 DigitalIn mybutton(USER_BUTTON); 00007 int main() { 00008 out=1; 00009 while(1) { 00010 if(mybutton==0) 00011 { 00012 out = 1; // LED is ON 00013 wait(2); 00014 out =0; 00015 } 00016 else 00017 { 00018 out =0; 00019 } 00020 if(in==1) 00021 myled=1; 00022 else 00023 myled=0; 00024 } 00025 }
Generated on Wed Jul 13 2022 01:54:42 by
1.7.2