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: MenuExample exosite_http_example exosite_http_example FastPWM
Homepage
Warning : Works with non-PWM LED (0 or 1).
A quick example on how to use it.
#include "mbed.h"
#include "RGBLed.h"
RGBLed led(LED_RED, LED_GREEN, LED_BLUE);
int main() {
    RGBLed::Color list[8] = {RGBLed::BLACK, RGBLed::RED, RGBLed::GREEN, RGBLed::BLUE, RGBLed::MAGENTA, RGBLed::CYAN, RGBLed::YELLOW, RGBLed::WHITE};
    int i = 0;
    while (true) {
        i = (i+1)%8;
        led.setColor(list[i]);
        wait_ms(100);
    }
}