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 led( LED2 ); 00004 Serial pc( USBTX , USBRX ); 00005 AnalogOut out( A4 ); 00006 00007 int main( void ){ 00008 00009 led = 1; 00010 pc.baud( 115200 ); 00011 00012 while( true ){ 00013 wait( 0.5 ); 00014 led = 0; 00015 out.write( 3.0 ); 00016 pc.printf("LED = %d \n\r",led.read()); 00017 wait( 0.5 ); 00018 led = 1; 00019 out.write( 0.0 ); 00020 pc.printf("LED = %d \n\r",led.read()); 00021 } 00022 00023 }
Generated on Tue Jul 12 2022 20:54:30 by
1.7.2