Neopixel module not found (Feather M4 Express)

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
JeffThompson
 
Posts: 42
Joined: Mon Jun 14, 2010 3:05 pm

Neopixel module not found (Feather M4 Express)

Post by JeffThompson »

Ok maybe this is a REALLY dumb question! I'm transitioning from Arduino/C++ to CircuitPython and am following the guides. Using the Mu Editor, I was able to blink the regular LED no problem. But when I try to run some basic code to control the built-in Neopixel, it says the module cannot be found.
Simplest code to reproduce the error:

Code: Select all

import board
import time
import neopixel
Which gives me the error:

Code: Select all

Traceback (most recent call last):
  File "code.py", line 3, in <module>
ImportError: no module named 'neopixel'
Contents of boot_out.txt:

Code: Select all

Adafruit CircuitPython 7.1.0 on 2021-12-28; Adafruit Feather M4 Express with samd51j19
Board ID:feather_m4_express
I'm running CircuitPython 7.1.0, freshly installed and the latest version of the Mu Editor.

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

Re: Neopixel module not found (Feather M4 Express)

Post by dastels »

You need to copy neopixel.mpy from the lib directory of the latest 7.x bundle from https://circuitpython.org/libraries (after unzipping it) into CIRCUITPY/lib

Dave

User avatar
JeffThompson
 
Posts: 42
Joined: Mon Jun 14, 2010 3:05 pm

Re: Neopixel module not found (Feather M4 Express)

Post by JeffThompson »

Ah super, works now! Doesn't say you need the lib in the Feather M4 Express setup guide (or maybe I missed it?). I'll go ahead and submit the suggestion on that page, thanks!

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

Re: Neopixel module not found (Feather M4 Express)

Post by dastels »

Basically, any time you see that "module not found" error it usually means you're missing something from the bundle in your CIRCUITPY/lib directory. There are cases where it's a library that another library needs, i.e. not always something that your code imports.

Dave

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

Return to “Feather - Adafruit's lightweight platform”