← Back

ofxPixelPusher

github.com/morphogencc/ofxPixelPusher · @morphogencc
OF 0.11 Hardware Interface

A C++ library to control PixelPusher LED Controllers, designed with openFrameworks in mind.

21 7 Last commit 6y ago Created 11y ago

Forks

Forks pushed to more recently than morphogencc/ofxPixelPusher itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

pierrep/ofxPixelPusher by @pierrep · ★ 1 · pushed 5y ago

Branches ahead of master

These branches have commits not yet on master — could be unmerged fixes or work in progress worth a look.

feature-cinder 1 commit ahead · last commit 8y ago
feature-monochrome 2 commits ahead · last commit 10y ago
small_design_firm 4 commits ahead · last commit 10y ago

README

ofxPixelPusher



A C++ implementation of pixelpusher software.

Requirements

This add-on requires ofxAsio for networking. See the repository for how to setup ofxAsio.

This implementation of the pixelpusher protocol attempts to be as framework-agnostic as possible; thus, it tries to avoid using openFrameworks-specific classes such as ofLog and ofThread, instead using the c++ equivalents. ofxAsio follows a similar paradigm, so the entire project should be portable to any other C++ framework.

Usage

In your application, create a std::shared_ptr<DiscoveryService> instance using DiscoveryService::getInstance(). This creates a separate thread that looks for PixelPusher announcements, and registers the PixelPushers with the Service.

Once a PixelPusher is detected, you can grab one with any of the three following methods:

The first two methods return a vector of shared pointers (std::vector<shared_ptr<PixelPusher> >), while the last one returns either an empty pointer or a pointer to a PixelPusher.

Once a PixelPusher is selected, strips can be assigned values with The first method sets all pixels in the strip stripNumber to the same color, while the latter method copies the vector of Pixel objects directly to the Strip objects. See the header file Strip.h for a more exhaustive listing of ways to set pixels.

Alternatively, you can call getStrips() on a PixelPusher object to get a deque of strips that you can iterate through, or getStrip(int stripNumber) to get a pointer to a particular strip. Once you have a pointer to a Strip, you can set the pixels with a variety of methods -- look at the header file to see a complete listing.

Each PixelPusher object automatically creates its own CardThread that manages sending data to the PixelPusher on its own thread. As long as you update the strips to reflect current data, everything else should run itself!

Options

There are a variety of options that can be used to adjust the LEDs. Currently implemented are:

PowerScale -- this controls the overall brightness of the LEDs; use a value between 0 and 1. ColorCorrection -- this corrects the color ratios so that the tuple (255, 255, 255) produces a "true" white pixel. Look at Pixel.h for a full listing of options. ColorTemperature -- this further corrects the colors to reflect a specific light source. Look at Pixel.h for a full listing. Tint -- you can also "tint" a strip by using the corresponding function call. This effectively multiples the assigned color (set via setPixels()) by a constant tint -- this allows you to either manually correct the color to a setting non available with the presets, or allow for some neat tricks in animating the strips.

Examples



example-colorFade -- sets all known pixels to the same color, slowly cycling through hues. example-colorChase -- sets all strips to a classic rainbow chase sequence.

Contributions

This project uses the Git Flow paradigm. Before contributing, please make your own feature branch with your changes.

This project was originally developed at Small Design Firm, before being open sourced on Github.

More Information / Credits

For more info about PixelPusher visit: To purchase a PixelPusher (and BetterPixel products), go to: Color Correction and Color Temperature presets were lifted straight from the FastLED library.

Get this addon

HTTPS
SSH