Feature/pixel range list#1
Open
ben-xo wants to merge 26 commits into
Open
Conversation
For many WS2811 strips, we can relax the clearing of interrupts down to protecting the timing of the shortest pulse. Your interrupts must still be very very fast in order for the strip not to latch part-way through.
* factor out the clock juggler * wrap showRGBInternal() in order to be fast enough
The example rotates a white dot around the LED strip, whilst remixing segments of the strip randomly.
ben-xo
force-pushed
the
feature/pixel-range-list
branch
from
January 6, 2022 23:39
0364c62 to
48e026c
Compare
Owner
Author
|
Here's another example. It loops a white dot along the strip, but the six ranges of LEDs which are rendered to the strip are randomly changed and potentially reversed every 2.5 seconds. As you can see, the same sub-range of pixels is often rendered more than once on the same frame.
127929727-221d150d-17b6-4e31-8a5b-a2d7ec4d71ff.1.mov |
…ptive and not the best example (so i don't want to imply it's "best" by not giving it a more precise name)
…stLED.show() / FastLED.delay()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
version of FastLED which allows you to render a linked list of pixel ranges, which can be backed by different segments from the same LED buffer.
Builds on work in my previous PRs (FastLED#2)
Probably needs bit more work to work on other pixel controllers than the Clockless Trinket, but I can't test those.
There are 3 example sketches, I've attached videos for two of them.
"Scrolling Comet" demo:
A rotating "comet" (a white pixel followed by a trail) is rotated around an entire strip just by manipulating the length of the ranges surrounding the comet. This is
PixelRangeScrollingComet.ino.Of note, is that, even though the strip is 60 pixels long (so would be >180 bytes of CRGB just for the pixels), the entire sketch only needs 158 bytes of RAM because there are only 17 LEDs in RAM (16 for the comet and 1 for "space" i.e. black, a single pixel with
skip=0which is rendered where the comet is not.) The comet is rendered once, and on each frame 3 ranges are manipulated: start, middle and end. When the comet is fully within the strip, start and end are varying lengths of 1px black, and the comet is rendered as is. When the comet overlaps the end of the strip, start and end are parts of the comet, with middle being black forSTRIP_LENGTH - COMET_LENGTHpixels.148664128-7a14449e-df8b-4757-8850-91bbad09e159.mp4