Pixled is a C++ library designed to produce generic led strips animations for 1D or 2D shapes.
It can be used directly as an embedded Arduino library, or from any other platform that handles C++ 11, for example to stream animations from a server.
In order to use the library from Arduino, you first need to locate your Arduino user repository.
- In the Arduino IDE :
File
->Preferences
->Sketchbook location
- Using
arduino-cli
: check thedirectories: user:
parameter of your current configuration file
Next, in a terminal, run :
cd your_arduino_user_repository
mkdir libraries
cd libraries
git clone https://github.com/pixled/pixled-lib
You can now use the pixled library adding an #include <pixled.h>
statement in
your Arduino sketches.
To update the library, go to the git cloned repository and run git pull
.
You can use CMake to build and install the Pixled library on any other platform that support CMake.
- Start installing CMake, depending on the current OS
- In the directory of your choice, run
git clone https://github.com/pixled/pixled-lib
- To build the library, use the following commands :
cd pixled-lib
mkdir build
cd build
cmake ..
make
- To install the library on the system, run
cmake --install
.
You should now be able to use #include <pixled.h>
in any C++ project.
You can use the provided CMakeLists.txt to build the Pixled library as a "subdirectory" of your CMake project. To do so :
- Go to the root of your project
- Run
git clone https://github.com/pixled/pixled-lib
- Add the following statement to your current CMakeLists.txt :
add_subdirectory(pixled-lib)
- Link the library to the target that require
pixled.h
add_executable(example example_main.cpp)
target_link_libraries(example pixled)