A arduino library with tools for controlling an RGB-LED
CMake C++ Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmake Make build working Jul 24, 2016
docs Add docs Aug 18, 2016
examples Fix example build Jul 26, 2016
src Version++ Jul 26, 2016
tests Add tests Jul 26, 2016
.travis.yml Add travis config Aug 9, 2016
CMakeLists.txt Add tests Jul 26, 2016
CONTRIBUTING.md Create CONTRIBUTING.md Jul 26, 2016
LICENSE updated version and copyright date Sep 11, 2015
README.md Update README.md Jul 26, 2016
doxygen.conf Add docs Aug 18, 2016

README.md

#RGB-Tools

RGBTools is a software library for Arduino for controlling an RGB-LED.

##Installation Import a ZIP file from the release section in your Arduino IDE.

##Initialization

#include <RGBTools.h>
 
// Initialize a common cathode RGB LED (default is common anode)
RGBTools rgb(9,10,11, COMMON_CATHODE);

##Set a color## Use the setColor-method for setting an RGB-specified color.

#include <RGBTools.h>
 
// set pins of red, green and blue
RGBTools rgb(9,10,11);
 
void setup(){
  // specify a color using R,G,B values
  rgb.setColor(255,0,0);
  // Or specify a color using the Color class in the header
  rgb.setColor(Color::BLUE);
}
 
void loop(){
  // nothing to loop
}

##Fade to color## Use the fadeTo-method for fade to a specific color in certain steps and time.

#include <RGBTools.h>
 
// set pins of red, green and blue
RGBTools rgb(9,10,11);
 
void setup(){
  rgb.fadeTo(255,0,0,50,3000); // to red in 50 steps and 3 seconds
}
 
void loop(){
  // nothing to loop
}

Docs

See the generated documentation