RGB - setColor

How to set the LED color using a RGB value

Example

This example shows how to set the LED color using a HEX value.

#include <NanoPlayBoard.h>

NanoPlayBoard board;

void setup() {

}

void loop() {
  board.rgb.setColor(255, 0, 0);  
  delay(500);
  board.rgb.setColor(0, 255, 0);
  delay(500);
  board.rgb.setColor(0, 0, 255);  
  delay(500);
}

The source code of this example is available on GitHub.