Neopixel LEDs and IO Pi expansion board
The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi
12/05/2020
Posted by:
user387283
Hardware:
Raspberry Pi Zero, IO Pi expansion board, and neopixel leds
Software Libraries - Python:
board, digitalio, ABElectronics IOPi and neopixel
IOPi.py
neopixel.py
This is an example of how to initialize the neopixel:
# Configure the setup
PIXEL_PIN = board.D1 # pin that the NeoPixel is connected to
ORDER = neopixel.RGB # pixel color channel order
COLOR = (100, 50, 150) # color to blink
CLEAR = (0, 0, 0) # clear (or second color)
DELAY = 0.25 # blink rate in seconds
# Create the NeoPixel object
pixel = neopixel.NeoPixel(PIXEL_PIN, 1, pixel_order=ORDER)
board.D1 being digital pin 1 from the raspberry pis gpio. How am I supposed to assign a pin from the IO Pi board to the pixel?
12/05/2020
Posted by:
andrew
Unfortunately, the IO Pi is not compatible with the neopixel as the I/O pins can not be switched on and off fast enough.
The neopixel needs a data speed of 800Kbps, while the maximum speed of the I/O pins on the IO Pi is around 1KHz.
14/05/2020
Posted by:
user387283
Thank you for your help
14/05/2020
Posted by:
andrew
The IO Pi boards would be suitable for buttons and LEDs but they will not control servos as they can not generate pulses fast enough. Each channel on the IO Pi can source up to 20mA of current with 125mA in total on a 16-channel bus so if you use it to drive LEDs you will need to make sure your overall current stays below 125mA.
For driving analogue servos you can use our Sero PWM Pi board which can control up to 16 Servos. The Sero PWM Pi would not be suitable for controlling a neopixel LED as it can not send data, only PWM signals.
Your best option for controlling neopixels would be through the Raspberry Pis GPIO header. Adafruit has a tutorial on its website for connecting neopixels to the GPIO port.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.