Skip to content

initialize neopixel power pin before neopixels #76

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

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Dec 10, 2021

resolves: #75

The neopixel library tries to initialize NEOPIXEL_POWER pin when you create the Neopixel object. It gracefully handles "pin in use" error. So we can initialize NEOPIXEL_POWER inside of MagTag library before creating the Neopixel object, that way the MagTag library will happen first and keep control of the power pin.

Tested successfully with reproducer code from the issue on MagTag 7.1.0 beta

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@FoamyGuy FoamyGuy requested review from a team and removed request for a team December 10, 2021 16:21
@FoamyGuy
Copy link
Contributor Author

Thanks for the review! I'm going to go ahead and merge / release this and let the person that originally reported it know.

@FoamyGuy FoamyGuy merged commit cf66ddb into adafruit:main Dec 10, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 11, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS to 4.2.2 from 4.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_LSM6DS#46 from tekktrik/feature/add-typing
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 2.1.5 from 2.1.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#68 from RufusVS/tone_frequency_0_fix
  > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#76 from FoamyGuy/power_before_neopixel_init

Updating https://github.com/adafruit/Adafruit_CircuitPython_PYOA to 2.5.0 from 2.4.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_PYOA#25 from lesamouraipourpre/remove-old-refresh
  > update rtd py version
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 this pull request may close these issues.

NeoPixels can't be disabled
2 participants