Skip to content

#76 breaks status_neopixel using board.NEOPIXEL #77

Closed
@VPTechOps

Description

@VPTechOps

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions