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 PwmOut r(LED_RED); 00004 PwmOut g(LED_GREEN); 00005 Serial pc(USBTX, USBRX); 00006 00007 void RX_handler(void); 00008 00009 int main() 00010 { 00011 r.period(0.001f); 00012 g.period(0.001f); 00013 00014 r = 1; 00015 g = 1; 00016 00017 pc.attach(&RX_handler); 00018 00019 while(1) 00020 { 00021 wait(0.2); 00022 } 00023 } 00024 00025 void RX_handler(void) 00026 { 00027 while(pc.readable()) 00028 { 00029 pc.putc(pc.getc()); 00030 } 00031 }
Generated on Tue Oct 11 2022 21:19:39 by
1.7.2