Macropad basics example giving errors

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
plet
 
Posts: 2
Joined: Thu Nov 17, 2022 4:11 pm

Macropad basics example giving errors

Post by plet »

Hello,

I've taken delivery of a Macropad and I'm trying to work through the examples but I'm failing. I've flashed CircuitPython 7.3.3 then I'm simply trying to get the example documented here: https://learn.adafruit.com/adafruit-mac ... pad-basics to work.

Unfortunately I'm getting an error:

Code: Select all

code.py output:
Traceback (most recent call last):
  File "code.py", line 11, in <module>
  File "adafruit_macropad.py", line 251, in __init__
AttributeError: 'module' object has no attribute 'NEOPIXEL'

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 7.3.3 on 2022-08-29; Raspberry Pi Pico with rp2040
I get the feeling there's something fundamentally stupid I'm doing but can't work out what. Any kindly soul able to put me right? Many thanks.

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

Re: Macropad basics example giving errors

Post by dastels »

Do you have the correct build of CircuitPython installed? It should be from https://circuitpython.org/board/adafrui ... ad_rp2040/. Note that CP builds are very board specific, not just MCU specific.

Dave

User avatar
plet
 
Posts: 2
Joined: Thu Nov 17, 2022 4:11 pm

Re: Macropad basics example giving errors

Post by plet »

I knew it must have been something stupid on my part. Yeah, that's it. I'd actually loaded a Raspberry Pico build.

Many thanks.

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

Re: Macropad basics example giving errors

Post by dastels »

You can always check the build in the REPL banner it outputs:
Adafruit CircuitPython 7.3.3 on 2022-08-29; Raspberry Pi Pico with rp2040
Dave

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

Return to “Adafruit CircuitPython”