I'm running CircuitPython 2.3.0 with the Mu editor and the 1138 LED strip. I'm using the CircuitPython demo for the NeoPixel https://learn.adafruit.com/adafruit-cir ... n-neopixel I have the latest CircuitPython libraries installed. I'm using a Metro M0 Express board.
When I reload, I'm getting
File "code.py", line 2, in <module>
File "neopixel.py", line 7, in <module>
AttributeError: 'module' object has no attribute 'NeoPixel'
Any ideas what might be causing this?
Here's the code:
import board
import neopixel
import time
pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=.2)
pixels.fill((0,0,0))
pixels.show()
'module' object has no attribute 'NeoPixel' - LED strip 1138
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- d7x
- Posts: 77
- Joined: Tue Oct 25, 2011 10:41 pm
- shawnerz
- Posts: 8
- Joined: Sat Jan 20, 2018 5:56 pm
Re: 'module' object has no attribute 'NeoPixel' - LED strip
Did you ever get a response to this? I'm having the same problem.
Thanks,
-Shawn
Thanks,
-Shawn
- adafruit2
- Posts: 22148
- Joined: Fri Mar 11, 2005 7:36 pm
Re: 'module' object has no attribute 'NeoPixel' - LED strip
try updating to CircuitPython 3 or 4, the API may have changed - and its been a long time since 2 :)
Please be positive and constructive with your questions and comments.