Itsy Bitsy RP2040 NeoPixel problem - MicroPython

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
infoberg
 
Posts: 8
Joined: Wed Dec 08, 2021 3:42 am

Itsy Bitsy RP2040 NeoPixel problem - MicroPython

Post by infoberg »

Total beginner here, trying to get the built-in NeoPixel to work.

I want to use MicroPython, so most of the product documentation for ItsyBitsy RP2040 which is exculsively available for CircuitPython is not really helpful. Using Pin 17 as per info on https://learn.adafruit.com/adafruit-its ... 40/pinouts : "The RGB NeoPixel LED is located near A0 and A1 on the silk. It is controllable in CircuitPython code using the pin board.NEOPIXEL. It is on RP2040 pin GPIO17."
Got a sample from the MicroPython website at https://docs.micropython.org/en/latest/ ... 106-driver, but it does absolutely nothing.

from machine import Pin
from neopixel import NeoPixel

pin = Pin(17, Pin.OUT)
np = NeoPixel(pin, 1)
np[0] = (255, 255, 255)
np.write()

What am I doing wrong?

User avatar
danhalbert
 
Posts: 4649
Joined: Tue Aug 08, 2017 12:37 pm

Re: Itsy Bitsy RP2040 NeoPixel problem - MicroPython

Post by danhalbert »

GPIO16 controls whether the NeoPixel gets power. You need to make it high to turn on the NeoPixel.

I will add something to the guide to make that clear.

User avatar
infoberg
 
Posts: 8
Joined: Wed Dec 08, 2021 3:42 am

Re: Itsy Bitsy RP2040 NeoPixel problem - MicroPython

Post by infoberg »

Thanks, that did the trick!

User avatar
blakebr
 
Posts: 956
Joined: Tue Apr 17, 2012 6:23 pm

Re: Itsy Bitsy RP2040 NeoPixel problem - MicroPython

Post by blakebr »

Watching/Tracking

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

Return to “Adafruit CircuitPython”