Skip to content

NEOPIXEL_POWER_INVERTED in use error on MagTag #55

Closed
@FoamyGuy

Description

@FoamyGuy

Running the magtag simpletest from examples in this repo currently raises this error:

code.py output:
wait before anything
after show, going to loop
Traceback (most recent call last):
  File "code.py", line 55, in <module>
ValueError: NEOPIXEL_POWER_INVERTED in use

I think this is the same root cause as: adafruit/Adafruit_CircuitPython_MagTag#76

The Neopixel library was updated to make it attempt to handle the power pin internally. It does have a graceful fallback if the pin has already been grabbed by something else. The example script in this repo can be updated to remove handling of the power pin I think since Neopixel will handle it by itself now. Or the other option is for user code to initialize the power pin before initializing the neopixels which in this case occurs as soon as pybadger is imported.

I'm found this while working on some unrelated changes to MagTag for this library. When I submit the PR for that I'll include this fix to the example script to get it back to working with current version of Neopixel library.

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