Reference   Language | Libraries | Comparison | Changes

Esplora

writeRGB()

Description

Write values representing brightness to the RGB LED. By mixing different values, it's possible to create different color combinations.

Syntax

Esplora.writeRGB(red, green, blue)

Parameters

  • red: int, value is to set the red LED brightness. Range 0 to 255
  • green: int, value is to set the green LED brightness. Range 0 to 255
  • blue: int, value is to set the blue LED brightness. Range 0 to 255

Returns

nothing

Example

#include <Esplora.h>

void setup() {}

void loop()
{
 Esplora.writeRGB(0, 128, 255);
 delay(1000);
 Esplora.writeRGB(255, 0, 128);
 delay(1000);
 Esplora.writeRGB(128, 255, 0);
 delay(1000);
}

See also

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.