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.
main.cpp
00001 #include "mbed.h" 00002 #include <string> 00003 using namespace std; 00004 00005 Serial pc(USBTX, USBRX); 00006 00007 DigitalOut led1(LED1); // blink 00008 DigitalOut led2(LED2); 00009 DigitalOut led3(LED3); 00010 DigitalOut led4(LED4); 00011 00012 Ticker t1, t2, t3, t4; 00013 00014 void blink1(){ 00015 pc.printf("blink1_start\n"); 00016 led1 = !led1; 00017 /* 00018 wait(10); 00019 pc.printf("blink1_end\n"); 00020 /**/ 00021 } 00022 00023 void blink2(){ 00024 led2 = !led2; 00025 } 00026 00027 void blink3(){ 00028 led3 = !led3; 00029 } 00030 00031 void blink4(){ 00032 led4 = !led4; 00033 } 00034 00035 int main(void){ 00036 t1.attach(&blink1, 1.0); 00037 t2.attach(&blink2, 2.0); 00038 t3.attach(&blink3, 3.0); 00039 t4.attach(&blink4, 0.6); 00040 while(1){ 00041 } 00042 }
Generated on Sat Jul 23 2022 04:47:19 by
1.7.2