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-STM32F103C8T6
main.cpp
00001 #include "mbed.h" 00002 #include "stm32f103c8t6.h" 00003 00004 Thread L1; 00005 Thread L2; 00006 DigitalOut L9( PC_13); 00007 00008 InterruptIn button( PB_1); 00009 00010 void d9(){ 00011 L9 = !L9; 00012 } 00013 00014 void Ltika_1(){ 00015 DigitalOut led( PA_0); 00016 led = 0; 00017 00018 while(1){ 00019 led = !led; 00020 wait(0.5); 00021 } 00022 } 00023 00024 void Ltika_2(){ 00025 DigitalOut led( PA_1); 00026 led = 0; 00027 while(1){ 00028 led = !led; 00029 wait(1); 00030 } 00031 } 00032 00033 int main() { 00034 DigitalOut led( PA_2); 00035 led = 0; 00036 00037 L9 = 1; 00038 button.mode( PullDown); 00039 button.rise( d9); 00040 button.fall( d9); 00041 00042 L1.start(Ltika_1); 00043 L2.start(Ltika_2); 00044 00045 while (true) { 00046 led = !led; 00047 wait(2); 00048 } 00049 } 00050
Generated on Sat Jul 16 2022 09:28:58 by
1.7.2