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 led1(LED1); 00004 DigitalOut led2(LED2); 00005 DigitalOut led3(LED3); 00006 DigitalOut led4(LED4); 00007 Ticker flipper1; 00008 Ticker flipper2; 00009 Ticker flipper3; 00010 Ticker flipper4; 00011 void flip1() { 00012 led1 = !led1; 00013 } 00014 void flip2() { 00015 led2 = !led2; 00016 } 00017 void flip3() { 00018 led3 = !led3; 00019 } 00020 void flip4() { 00021 led4 = !led4; 00022 } 00023 00024 int main() { 00025 led1 = 1; 00026 led2 = 1; 00027 led3 = 1; 00028 led4 = 1; 00029 flipper1.attach(&flip1, 1.0); 00030 flipper2.attach(&flip2, 2.0); 00031 flipper3.attach(&flip3, 4.0); 00032 flipper4.attach(&flip4, 8.0); 00033 while(1) { 00034 00035 } 00036 }
Generated on Fri Oct 14 2022 19:33:44 by
1.7.2