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 X_NUCLEO_IKS01A2
main.cpp
00001 #include "mbed.h" 00002 00003 InterruptIn button(USER_BUTTON); 00004 00005 DigitalOut led(LED1); 00006 00007 //double delay = 0.5; // 500 ms 00008 00009 void pressed() 00010 { 00011 led = !led; // 100 ms 00012 } 00013 00014 //void released() 00015 //{ 00016 // delay = 0.5; // 500 ms 00017 //} 00018 00019 int main() 00020 { 00021 00022 // Assign functions to button 00023 button.fall(&pressed); 00024 // button.rise(&released); 00025 00026 while (1) { 00027 // led = !led; 00028 // wait(delay); 00029 } 00030 }
Generated on Sun Jul 31 2022 18:38:29 by
1.7.2