Pacifica - AlbertGBarber/PixelSpork GitHub Wiki
See the Documentation Guide for help understanding each page section.
Effect Sample (see here for sample info) (Looks more teal IRL) |
![]() |
An effect based on the pacific code here, written by Mark Kriegsman and Mary Corey March.
A gentle effect of blue-green ocean waves rolling across the strip. The effect runs as is; there's no customization. Almost all of the code is directly copied from the original linked above. If you have any questions about how it works, please direct them to Mark Kriegsman. For a hue-based version of the effect see Pacifica Hue.
The palettes can be found in "pacificaPalette.h" in the code. I tried to adapt the original effect's FastLED palettes to Pixel Spork's palettes. Overally I think I got pretty close, although it's not 100% perfect.
Recommend brightness >80 and rate > 20ms. For low brightness values I recommend turning off dithering using FastLED.setDither(0)
.
The effect is 1D only. Pacifica Hue for a 2D version.
The effect is a bit computationally heavy.
Note, I've made the background color a pointer so you can bind it externally (as it is in other effects). You probably shouldn't change it tho, b/c it heavily influences the effect.
PacificaPS pacifica(mainSegments, 40);
//That's it, updates at 40ms
PacificaPS(SegmentSetPS &SegSet, uint16_t Rate);
-
SegmentSetPS* segSet -- The Segment Set the effect will draw on. See common vars
segSet
entry for more details. -
uint16_t* rate -- Update rate (ms). Is a pointer, allowing you to bind it to an external variable. By default it's bound the effect's local variable,
rateOrig
. See common varsrate
entry for more.
- bool showNow (default true) -- Controls if the effect "draws" during each update cycle by calling
FastLED.show()
. Common to all effects. See common varsshowNow
entry for more details.
-
Updates the effect.
void update();