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 myled(LED1); 00004 PwmOut blue(p24); 00005 PwmOut green(p25); 00006 PwmOut red(p26); 00007 00008 int main() { 00009 while(1) { 00010 for(float p = 0.0f; p < 1.0f; p += 0.05f) { 00011 blue = p; 00012 green = 1 - p; 00013 wait(0.04); 00014 } 00015 for(float p = 0.0f; p < 1.0f; p += 0.05f) { 00016 red = p; 00017 blue = 1 - p; 00018 wait(0.04); 00019 } 00020 for(float p = 0.0f; p < 1.0f; p += 0.05f) { 00021 green = p; 00022 red = 1 - p; 00023 wait(0.04); 00024 } 00025 } 00026 }
Generated on Sun Jul 24 2022 18:27:43 by
1.7.2