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 "rtos.h" 00003 00004 DigitalOut led1(LED1); 00005 DigitalOut led2(LED2); 00006 DigitalIn pb1(A0); 00007 DigitalIn pb2(D0); 00008 Thread thread1; 00009 Thread thread2; 00010 00011 void led1_thread1() { 00012 while (true) { 00013 led1 = pb1; 00014 } 00015 } 00016 00017 void led2_thread2() { 00018 while (true) { 00019 led2 = pb2; 00020 } 00021 } 00022 00023 int main() { 00024 thread1.start(led1_thread1); 00025 thread2.start(led2_thread2); 00026 00027 while (true) { 00028 } 00029 }
Generated on Sun Dec 4 2022 01:38:20 by
1.7.2