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.
Dependents: m3Dpi MQTT-Thermostat-example Final_project_Tran Final_project_Tran ... more
You are viewing an older revision! See the latest version
Homepage
RGB-fun¶
RGB library used to control RGB leds using PWM modulation to dim and mix the individual colors.
By combining red, green and blue a great amount of colors can be created. This class can accept color objects or colors in hexadecimal notation (web color notation).
Note: effects and effectsmanager are still experimental and not documented.
Import library
Public Member Functions |
|
| RGB (PinName r_pin, PinName g_pin, PinName b_pin) | |
|
Create a new
RGB
instance.
|
|
| void | setColor ( Color *color) |
|
Set the color by giving an instance of an
Color
object.
|
|
| void | setColor (int color) |
|
Set the color by giving an integer in hexadecimal notation.
|
|
| Color * | getColor () |
|
Get the current color of the
RGB
led.
|
|
| void | off () |
|
Turn the led off.
|
|