Re: Errors in the Larson Scanner Shades project code.
by bilagaana on Wed Jan 19, 2022 5:52 pm
That was a learning experience. One which would not have been necessary had the Trinket been shipped with a current iteration of onboard software. In any case, now I know what to look for if the problem recurs on other boards.
It appears that the Larson Scanner routine needs the library module:
adafruit_pypixelbuf.mpy
and, possibly (it's unclear to me from the REPL messages):
neopixel.mpy
...copied to the lib folder on the board.
After those are copied over, the code does run and produce the Larson Scanner effect.
The animation does still illuminate the tail-end pixel before reversing direction (as noted in the thread linked at the start of this Topic). Inserting user caitlinsdad's "while True" code snippet (as seen in the original Topic) corrects that problem. There's still a white flash sneaking into the main pixel grouping just before the sequence reverses direction nearest the cpu. This will give me something else to troubleshoot and perhaps learn something about CircuitPython in the process.
In addition, changing the value for the #brightest pixel from (255, 48, 0) to (255, 0, 0) produces what to my tastes is a more esthetically pleasing pure red.
I appreciate your patience and assistance.