MacroPad Sample Code is Failing

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dsheeran
 
Posts: 185
Joined: Wed Aug 02, 2017 1:20 pm

MacroPad Sample Code is Failing

Post by dsheeran »

The following sample code for Adabox 19 with the MacroPad is failing.

Here is the code.....

from adafruit_macropad import MacroPad

macropad = MacroPad()

text_lines = macropad.display_text(title="MacroPad Info")

while True:
key_event = macropad.keys.events.get()
if key_event and key_event.pressed:
text_lines[0].text = "Key {} pressed!".format(key_event.key_number)
text_lines[1].text = "Rotary encoder {}".format(macropad.encoder)
text_lines[2].text = "Encoder switch: {}".format(macropad.encoder_switch)
text_lines.show()

_____________________________________________________________________________

Here is the error....

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 1, in <module>
File "adafruit_macropad.py", line 71, in <module>
File "adafruit_simple_text_display.py", line 31, in <module>
ImportError: no module named 'adafruit_display_text.bitmap_label'

Code done running.

______________________________________________________________________

I'm using Circuit Phython 7 and it's associated library.

Please assist.

User avatar
dsheeran
 
Posts: 185
Joined: Wed Aug 02, 2017 1:20 pm

Re: MacroPad Sample Code is Failing

Post by dsheeran »

Please disregard this. One of the libraries copied over empty and that was the problem. It's working now. Thanks anyway.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: MacroPad Sample Code is Failing

Post by dastels »

I was about to suggest checking the libs. It's a good idea to update them regularly (even daily) for such a new product. Fixes and enhancements happen a lot for new board support.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”