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 #include "RGB.h" 00003 00004 RGB led(p23,p24,p25); 00005 00006 int main() 00007 { 00008 led.off(); 00009 00010 wait(1.0); 00011 00012 // setting the color using the Color enum with named colors 00013 led.setColor(Color::RED); 00014 00015 // setting the color using a hexadecimal notated integer (yellow) 00016 led.setColor(0xFFFF00); 00017 00018 // setting the color using an instance of the Color class 00019 Color* myColor = new Color(0,255,0); 00020 led.setColor(myColor); 00021 delete myColor; 00022 }
Generated on Mon Aug 1 2022 14:37:03 by
1.7.2