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
The change for the neopixel power issue now prevents using board.NEOPIXEL for the network status_neopixel operand. I used the magtag library as magtag = Magtag(status_neopixel = board.NEOPIXEL). This will reproduce the issue.
I found that the initialization of Magtag() now initializes Network() before Peripherals(). When the status_neopixel operand is processed, Network() generates a new neopixel object using board.NEOPIXEL as neopixel.NeoPixel(status_neopixel, 1, brightness=0.2). Then, when Magtag() later initializes Peripherals(), Peripherals() attempts to create its neopixel object, board.NEOPIXEL is now in use.
I verified by creating a work around that moves init of Peripherals() before Network() and passing the self.peripherals.neopixels object to the Network() init. I also changed Network() to accept whatever status_NEOPIXEL parameter object that gets received and just uses that one instead of creating a new object. This works as intended.
The text was updated successfully, but these errors were encountered:
I will do that. I need to update the code in network.py to allow anyone using a pin other than board.NEOPIXEL to still use the status_neopixel parameter with their pin. Will work on it later today.
The change for the neopixel power issue now prevents using board.NEOPIXEL for the network status_neopixel operand. I used the magtag library as magtag = Magtag(status_neopixel = board.NEOPIXEL). This will reproduce the issue.
I found that the initialization of Magtag() now initializes Network() before Peripherals(). When the status_neopixel operand is processed, Network() generates a new neopixel object using board.NEOPIXEL as neopixel.NeoPixel(status_neopixel, 1, brightness=0.2). Then, when Magtag() later initializes Peripherals(), Peripherals() attempts to create its neopixel object, board.NEOPIXEL is now in use.
I verified by creating a work around that moves init of Peripherals() before Network() and passing the self.peripherals.neopixels object to the Network() init. I also changed Network() to accept whatever status_NEOPIXEL parameter object that gets received and just uses that one instead of creating a new object. This works as intended.
The text was updated successfully, but these errors were encountered: