Here's a stripped down version of the program. If I comment out the "magtag = MagTag()" line, it doesn't fail. Leaving it active generates the "Value error: BUTTON_B in use".
I've not figured out if I'm doing something wrong as of yet, but at least I have a simple representation of the issue.
- Code: Select all | TOGGLE FULL SIZE
import alarm
import alarm.pin
import board
from adafruit_magtag.magtag import MagTag
magtag = MagTag()
names_cycle = ("Catherine", " Brian ")
if not alarm.wake_alarm:
alarm.sleep_memory[0] = 0
else:
if alarm.sleep_memory[0] == 0:
alarm.sleep_memory[0] = 1
else:
alarm.sleep_memory[0] = 0
out = names_cycle[alarm.sleep_memory[0]]
print(out)
pin_alarm = alarm.pin.PinAlarm(pin=board.D14, value=False, pull=True)
board.DISPLAY.refresh()
alarm.exit_and_deep_sleep_until_alarms(pin_alarm)