Skip to content

rename mag_tag to magtag. Fix neopixel power pin handling #56

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 2 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adafruit_pybadger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
elif "Circuit Playground Bluefruit" in os.uname().machine:
from .cpb_gizmo import cpb_gizmo as pybadger
elif "MagTag with ESP32S2" in os.uname().machine:
from .mag_tag import mag_tag as pybadger
from .magtag import magtag as pybadger
4 changes: 2 additions & 2 deletions adafruit_pybadger/mag_tag.py → adafruit_pybadger/magtag.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: MIT

"""
`adafruit_pybadger.mag_tag`
`adafruit_pybadger.magtag`
================================================================================

Badge-focused CircuitPython helper library for Mag Tag.
Expand Down Expand Up @@ -80,5 +80,5 @@ def _unsupported(self):
button = _unsupported


mag_tag = MagTag() # pylint: disable=invalid-name
magtag = MagTag() # pylint: disable=invalid-name
"""Object that is automatically created on import."""
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.. automodule:: adafruit_pybadger.clue
:members:

.. automodule:: adafruit_pybadger.mag_tag
.. automodule:: adafruit_pybadger.magtag
:members:

.. automodule:: adafruit_pybadger.pewpewm4
Expand Down
6 changes: 0 additions & 6 deletions examples/pybadger_magtag_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ def try_refresh():

print("after show, going to loop")

neopixel_pwr = digitalio.DigitalInOut(board.NEOPIXEL_POWER)
neopixel_pwr.direction = digitalio.Direction.OUTPUT
neopixel_pwr.value = False
pybadger.pixels.fill(0x000022)

while True:
Expand All @@ -65,7 +62,6 @@ def try_refresh():

if prev_a and not cur_a:
pybadger.pixels.fill(0x000000)
neopixel_pwr.value = True
if SHOWING != "badge":
print("changing to badge")
SHOWING = "badge"
Expand All @@ -76,7 +72,6 @@ def try_refresh():

if prev_b and not cur_b:
pybadger.pixels.fill(0x000000)
neopixel_pwr.value = True
if SHOWING != "qr":
print("changing to qr")
SHOWING = "qr"
Expand All @@ -85,7 +80,6 @@ def try_refresh():

if prev_c and not cur_c:
pybadger.pixels.fill(0x000000)
neopixel_pwr.value = True
if SHOWING != "card":
print("changing to card")
SHOWING = "card"
Expand Down