Arduino Function: Esplora.writeRGB

Description

This function writes 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

Examples

#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);
}


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc