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 mbed-os-example-mbed5-blinky by
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut led1(LED1); 00004 Serial pc(USBTX, USBRX); 00005 DigitalIn button(PC_13); 00006 00007 // main() runs in its own thread in the OS 00008 // Message to Bryce. 00009 00010 int main() { 00011 while (true) { 00012 if (button.read()) led1 = 1; 00013 else led1=0; 00014 // pc.putc(pc.getc()); 00015 //led1 = !led1; 00016 //if (led1) { 00017 // pc.printf("ON\n\r"); 00018 // wait(2); 00019 // } 00020 // else { 00021 // pc.printf("OFF\n\r"); 00022 // wait(1); 00023 // } 00024 00025 } 00026 } 00027
Generated on Tue Jul 12 2022 23:07:59 by
1.7.2
