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 DigitalOut led(D2); 00003 Serial pc(USBTX, USBRX); 00004 char val; 00005 int main() { 00006 pc.baud(9600); 00007 while(1) { 00008 if(pc.readable()) { 00009 pc.printf("Ready\n"); 00010 val = pc.getc(); 00011 if(val=='a'){ 00012 led = 1 ; 00013 pc.printf("LED ON\n"); 00014 } 00015 else if (val == 'b') { 00016 led = 0; 00017 pc.printf("LED OFF\n"); 00018 } 00019 } 00020 } 00021 }
Generated on Tue Aug 9 2022 09:20:22 by
1.7.2