Skip to main content

LEDs

The Quarto has a user-controlled RGB LED on the front panel and the red, green and blue LEDs can be individually controlled with the following functions:

setLED

void setLED(bool red, bool green, bool blue);

This function sets the red, green and blue front-panel LED on or off.

  • red If set to true or 1, turns on the red LED. false or 0 turns off the LED.
  • green If set to true or 1, turns on the green LED. false or 0 turns off the LED.
  • blue If set to true or 1, turns on the blue LED. false or 0 turns off the LED.

Example

setLED(true,false,false); //Red
setLED(false,true,true); //Green and Blue

toggleLED

void toggleLED(bool red, bool green, bool blue);

This function conditionally toggles the state (on or off) of the red, green and or front-panel LED.

  • red If set to true or 1, toggles the red LED from on or off, of off to on.
  • green If set to true or 1, toggles the green LED from on or off, of off to on.
  • blue If set to true or 1, toggles the blue LED from on or off, of off to on.

Example

toggleLED(true,false,false); //toggles the red LED
toggleLED(false,true,true); //toggle the green and blue LEDs

setLEDRed / setLEDGreen / setLEDBlue

void setLEDRed(bool on);
void setLEDGreen(bool on);
void setLEDBlue(bool on);

These functions set the LED state on or off for the red, green and blue LED respectively. These functions take the following arguments:

  • on If set to true or 1, turns on the LED. false or 0 turns off the LED.

Example

setLEDRed(false); //turn off red LED
setLEDBlue(true); //turn on blue LED

toggleLEDRed / toggleLEDGreen / toggleLEDBlue

void toggleLEDRed(void);
void toggleLEDGreen(void);
void toggleLEDBlue(void);

These functions toggle the LED state on or off for the red, green and blue LED respectively. These functions take no arguments.

Example

toggleLEDRed(false); //toggle the red LED state
toggleLEDGreen(true); //toggle the green LED state