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 relay1(D6); 00004 InterruptIn sw2(SW2); 00005 00006 DigitalOut relay2(D10); 00007 InterruptIn sw3(SW3); 00008 00009 void sw2_release(void) 00010 { 00011 relay1 = !relay1; 00012 } 00013 00014 void sw3_release(void) 00015 { 00016 relay2 = !relay2; 00017 } 00018 00019 int main() 00020 { 00021 sw2.rise(&sw2_release); 00022 sw3.rise(&sw3_release); 00023 while (true) { 00024 } 00025 }
Generated on Tue Jul 12 2022 21:28:57 by
1.7.2