Closed LukeMoll closed 4 years ago
@LukeMoll Would you mind creating a fix PR for this? I think you can either init the pin earlier or disable auto_write until everything is set.
Sure, I can have a go at that sometime next week :)
@LukeMoll Awesome! Thanks! Join our discord if you need any help (or just want to :-) ): https://adafru.it/discord
This code is working properly for me on a Neo Trellis M4 with 5.4.0.beta and Neo pixel library out of today's library bundle:
import board
import neopixel
pixels = neopixel.NeoPixel(board.NEOPIXEL, 32, brightness=0.05)
pixels[0] = (0,0,100)
while True:
pass
I am not experiencing any crash or other issues from this code.
What device and version of Circuit Python are you using when you see this error?
@FoamyGuy I mentioned at the bottom of my issue:
Tested with Adafruit CircuitPython 5.3.0 on 2020-04-29; stm32f411ce-blackpill with STM32F411CE, CircuitPython bundle 5.x 20200526.
I've got an ItsyBitsy M4 and Trinket M0 that I can try reproducing on later.
Ah, whoops. I missed that on the first read. Thank you. The STM32 port is somewhat newer. I wonder if this is actually a symptom of an issue with that port rather than the neopixel library.
I will test on a nrf52840 based device as well so we will cover all of the current main processor types between us.
Hi, I found same error when auto_write=True - could you verify this as well?
I actually ran into this testing someone's code from the forum today, the brightness wouldn't change when auto_write was enabled
I get this on 5.3.0 using 20200703 libs too.
Another issue from the forum which is likely to be this too: Adafruit Forums: Help needed! REALLY basic!).
Setting
brightness
to than1.0
inNeoPixel()
causes the following error:I believe this is attributed to self._transmit being called (referencing
self.pin
) bypypixelbuf
as part of super().init, beforeself.pin
is initialised on line 135.Tested with
Adafruit CircuitPython 5.3.0 on 2020-04-29; stm32f411ce-blackpill with STM32F411CE
, CircuitPython bundle 5.x 20200526.