Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joushx/arduino-rgb-tools
A arduino library with tools for controlling an RGB-LED
https://github.com/joushx/arduino-rgb-tools
arduino led rgb
Last synced: 3 months ago
JSON representation
A arduino library with tools for controlling an RGB-LED
- Host: GitHub
- URL: https://github.com/joushx/arduino-rgb-tools
- Owner: joushx
- License: mit
- Created: 2012-08-09T09:30:30.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-08-18T09:57:04.000Z (over 8 years ago)
- Last Synced: 2024-10-18T15:13:06.155Z (3 months ago)
- Topics: arduino, led, rgb
- Language: CMake
- Homepage:
- Size: 166 KB
- Stars: 40
- Watchers: 9
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
#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
```c++
#include
// 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.```c++
#include
// 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.```c++
#include
// 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](http://joushx.github.io/Arduino-RGB-Tools)