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 Serial pc(USBTX, USBRX); // tx, rx 00004 00005 DigitalOut myled1(LED1); 00006 DigitalOut myled2(LED2); 00007 DigitalOut myled3(LED3); 00008 DigitalOut myled4(LED4); 00009 00010 int main() { 00011 while(1) { 00012 myled1 = 1; 00013 myled4 = 0; 00014 pc.printf("led 1 on\r\n"); 00015 wait(0.1); 00016 myled1 = 0; 00017 myled2 = 1; 00018 pc.printf("led 2 on\r\n"); 00019 wait(0.1); 00020 myled2 = 0; 00021 myled3 = 1; 00022 pc.printf("led 3 on\r\n"); 00023 wait(0.1); 00024 myled3 = 0; 00025 myled4 = 1; 00026 pc.printf("led 4 on\r\n"); 00027 wait(0.1); 00028 } 00029 }
Generated on Sat Jul 30 2022 01:09:04 by
1.7.2