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 DigitalOut buzzer(D2); 00004 DigitalOut led_green(LED_GREEN); 00005 InterruptIn sw2(SW2); 00006 00007 void sw2_release(void) 00008 { 00009 led_green = !led_green; 00010 buzzer = !buzzer; 00011 00012 printf("On-board button SW2 was released.\n"); 00013 } 00014 00015 int main() 00016 { 00017 sw2.rise(&sw2_release); 00018 while (true) { 00019 } 00020 } 00021 00022 00023 00024 00025 00026
Generated on Thu Jul 14 2022 22:59:42 by
1.7.2