Skip to content

NEOPIXEL_POWER_INVERTED in use error on MagTag #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
FoamyGuy opened this issue Dec 14, 2021 · 0 comments · Fixed by #56
Closed

NEOPIXEL_POWER_INVERTED in use error on MagTag #55

FoamyGuy opened this issue Dec 14, 2021 · 0 comments · Fixed by #56

Comments

@FoamyGuy
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant