This library depends on a slightly modified version of the Adafruit GFX library and provides advanced drawing functions(lines, circles, text, ...) for the Colorduino or the Colors Shield.
The Colorduino GFX library depends on the Adafruit GFX library. Use the original Adafruit GFX library or the 8-bit mode of the slightly modified version for a smaller code size. Download and install the dependencies first.
Download the source code and rename the uncompressed folder to Colorduino_GFX. The folder should at least contain the files Colorduino_GFX.cpp and Colorduino_GFX.h. Place the folder in your <Arduino-Sketch-Folder>/libraries/
folder and restart the Arduino IDE.
Include all required libraries first.
#include <Adafruit_GFX.h>
#include <Colorduino_GFX.h>
Create a new Colorduino instance.
ColorduinoPanel Colorduino;
Initialize the Colorduino and set the white-balance in the setup() function.
void setup() {
Colorduino.init();
Colorduino.setWhiteBalance(36, 63, 63);
}
Now the Colorduino is ready to use.
void loop() {
GFX_Color_t color = Colorduino.color(255, 0, 0);
Colorduino.drawLine(0, 0, 7, 7, color);
Colorduino.swapBuffers(true);
}
The library is licensed under the LGPL 2.1 or a later version of the license.
The source code is based on C code by zzy@iteadstudio and Sam C. Lin
Copyright (c) 2010 zzy@IteadStudio. All right reserved.
Copyright (c) 2011-2012 Sam C. Lin <lincomatic@hotmail.com>
The examples are licensed under the LGPL 2.1 or a later version of the license.
- Adafruit GFX Library
- Colorduino GFX Library (Sources and Bug Tracker)
- Colorduino GFX Library project page
- Modified version of the Adafruit GFX Library (optional)
- Original Colorduino Library