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 PwmOut led(LED1); 00004 DigitalOut led2(LED2); 00005 DigitalOut led3(LED3); 00006 PwmOut led4(LED4); 00007 00008 int main() { 00009 while(1) { 00010 for(float p = 0.0f; p < 1.0f; p += 0.1f) { 00011 led = p; 00012 wait(0.1); 00013 } 00014 led2 = 1; 00015 wait(0.25); 00016 led3 = 0; 00017 wait(0.25); 00018 led2 = 0; 00019 wait(0.25); 00020 led3 = 1; 00021 wait(0.25); 00022 for(float p4 = 0.0f; p4 < 1.0f; p4 += 0.1f) { 00023 led4 = p4; 00024 wait(0.1); 00025 } 00026 } 00027 }
Generated on Thu Aug 25 2022 13:52:17 by
1.7.2