RGB
mirrorTo()
Since 0.6.1:
Allows a set of PWM pins to mirror the functionality of the on-board RGB LED.
// SYNTAX
// Common-cathode RGB LED connected to A4 (R), A5 (G), A7 (B)
RGB.mirrorTo(A4, A5, A7);
// Common-anode RGB LED connected to A4 (R), A5 (G), A7 (B)
RGB.mirrorTo(A4, A5, A7, true);
// Common-anode RGB LED connected to A4 (R), A5 (G), A7 (B)
// Mirroring is enabled in firmware _and_ bootloader
RGB.mirrorTo(A4, A5, A7, true, true);
// Enable RGB LED mirroring as soon as the device starts up
STARTUP(RGB.mirrorTo(A4, A5, A7));
Parameters:
pinr: PWM-enabled pin number connected to red LED (seeanalogWrite()for a list of PWM-capable pins)ping: PWM-enabled pin number connected to green LED (seeanalogWrite()for a list of PWM-capable pins)pinb: PWM-enabled pin number connected to blue LED (seeanalogWrite()for a list of PWM-capable pins)invert(optional):trueif the connected RGB LED is common-anode,falseif common-cathode (default).bootloader(optional): iftrue, the RGB mirroring settings are saved in DCT and are used by the bootloader. Iffalse, any previously stored configuration is removed from the DCT and RGB mirroring only works while the firmware is running (default). Do not use thetrueoption forbootloaderfromSTARTUP().