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 mbed-rtos X_NUCLEO_IHM02A1
Buttons.cpp
00001 #include "SETUP.h" 00002 00003 00004 extern DigitalIn Button1; 00005 extern DigitalIn Button2; 00006 00007 00008 bool get_Button_1() 00009 { 00010 if(Button1 == 1) 00011 { 00012 wait(0.01); 00013 if(Button1 == 1) 00014 { 00015 return true; 00016 } 00017 } 00018 else if(Button1 == 0) 00019 { 00020 wait(0.01); 00021 if(Button1 == 0) 00022 { 00023 return false; 00024 } 00025 } 00026 else return false; 00027 } 00028 00029 bool get_Button_2() 00030 { 00031 if(Button2 == 1) 00032 { 00033 wait(0.01); 00034 if(Button2 == 1) 00035 { 00036 return true; 00037 } 00038 } 00039 else if(Button2 == 0) 00040 { 00041 wait(0.01); 00042 if(Button2 == 0) 00043 { 00044 return false; 00045 } 00046 } 00047 else return false; 00048 } 00049 00050 /* ---------------------------------- END ----------------------------------- */ 00051
Generated on Mon Jul 25 2022 02:36:14 by
 1.7.2
 1.7.2