You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue stems from a user in the #help-with-circuitpython discord channel. It was originally noticed on a Feather Cricket, which is also how I've done the testing on it. But I believe I've narrowed the behavior down to the seesaw library, if this issue would be more appropriate on the crickit library though let me know and I can move it to there.
It seems that changing neopixel.brightness does not take effect when auto_write is True or even when show() is called.
It does take effect after you call fill() or on each pixel when you set it's color individually. Even if you are setting them to the same color they are already on.
This code illustrates the behavior:
importtimefromadafruit_crickitimportcrickitPIXELS=30crickit.init_neopixel(PIXELS)
crickit.neopixel.fill((0,0,255))
time.sleep(1) # showing full brightnesscrickit.neopixel.brightness=0.02crickit.neopixel.show()
time.sleep(1) # still showing full brightness hereforiinrange(0,10):
crickit.neopixel[i] = (0,0,255)
time.sleep(1) # now the first 10 are dimcrickit.neopixel.fill((0,0,255))
# now they are all dim
Looking at the brightness setter code here it appears to be checking auto_show and calling show() as if the expectation is that this would update the brightness.
I am guessing that an ultimate fix for this would need to be made inside the seesaw firmware. But I'm not certain.
Aside from changing the seesaw firmware I am wondering if either of these two options are acceptable resolutions:
Change the brightness setter at the python layer to "manually" set each pixel back to it's current color in order to force the brightness change. I assume this would cost some compute time, but would make it take effect without the end user having to worry about it.
Document the current behavior in the docs and/or comment code within this library and the crickit library (and any others that it may be applicable to if there are any). This would let people know how the brightness is expected to behave
The text was updated successfully, but these errors were encountered:
This issue stems from a user in the #help-with-circuitpython discord channel. It was originally noticed on a Feather Cricket, which is also how I've done the testing on it. But I believe I've narrowed the behavior down to the seesaw library, if this issue would be more appropriate on the crickit library though let me know and I can move it to there.
It seems that changing
neopixel.brightness
does not take effect whenauto_write
isTrue
or even whenshow()
is called.It does take effect after you call
fill()
or on each pixel when you set it's color individually. Even if you are setting them to the same color they are already on.This code illustrates the behavior:
Looking at the brightness setter code here it appears to be checking
auto_show
and callingshow()
as if the expectation is that this would update the brightness.I am guessing that an ultimate fix for this would need to be made inside the seesaw firmware. But I'm not certain.
Aside from changing the seesaw firmware I am wondering if either of these two options are acceptable resolutions:
Change the brightness setter at the python layer to "manually" set each pixel back to it's current color in order to force the brightness change. I assume this would cost some compute time, but would make it take effect without the end user having to worry about it.
Document the current behavior in the docs and/or comment code within this library and the crickit library (and any others that it may be applicable to if there are any). This would let people know how the
brightness
is expected to behaveThe text was updated successfully, but these errors were encountered: