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 00003 DigitalOut l1(LED1); 00004 DigitalOut l2(LED2); 00005 DigitalOut l3(LED3); 00006 00007 Serial talky(PTC4, PTC3); 00008 Serial pc(USBTX, USBRX); 00009 00010 int main() { 00011 00012 l1=1; 00013 l2=1; 00014 l3=1; 00015 while(1) { 00016 if (pc.readable() && talky.writeable()){ 00017 char c = pc.getc(); 00018 l1=!l1; 00019 talky.putc(c); 00020 wait(0.01); 00021 l1=!l1; 00022 } 00023 if (talky.readable() && pc.writeable()){ 00024 l2=!l2; 00025 char c2 = talky.getc(); 00026 wait(0.01); 00027 l2=!l2; 00028 pc.putc(c2); 00029 } 00030 wait(0.01); 00031 } 00032 }
Generated on Mon Aug 15 2022 20:45:31 by
1.7.2