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.
Fork of OmniWheels by
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut led1(LED1); 00004 DigitalOut led2(LED2); 00005 00006 Serial computer(USBTX, USBRX); 00007 00008 // This function is called when a character goes into the TX buffer. 00009 void txCallback() { 00010 led1 = !led1; 00011 } 00012 00013 // This function is called when a character goes into the RX buffer. 00014 void rxCallback() { 00015 led2 = !led2; 00016 computer.putc(computer.getc()); 00017 } 00018 00019 int main() { 00020 printf("start test\n"); 00021 computer.attach(&txCallback, Serial::TxIrq); 00022 computer.attach(&rxCallback, Serial::RxIrq); 00023 while (true) { 00024 wait(1); 00025 } 00026 }
Generated on Fri Jul 22 2022 04:53:55 by
1.7.2
