LED strip Raspberry Pi board import error

Hello, I’m following the tutorial on how to control ws281x LED strips with a Raspberry Pi. Everything has worked until I started to run the OneStripNeopixel.py file. I’m getting the following error.

Traceback (most recent call last):
File “/home/pltw1/Desktop/OneStripNeopixel.py”, line 3, in
import board
ModuleNotFoundError: No module named ‘board’

I’m using a Raspberry Pi 4B with a 50 LED strip of ws2811 LEDs.
I’m pretty new to Raspberry Pi, so any help would be appreciated. Thanks!

ModuleNotFoundError: ‘No module named board’ means that Python can’t find a module named board. Check if pip is installed and updated:

sudo apt update
sudo apt install python3-pip
pip3 install --upgrade pip

Install Adafruit Blinka and related libraries: These are required for board, digitalio, and other CircuitPython modules to work on the Raspberry Pi.

pip3 install adafruit-blinka

I hope this problem will get solved. If you wanna make a circuit to control the intensity of ws281x LED strips, you can see here:

Hi, thank you for the help. Unfortunately I inputted the commands you suggested into the terminal and I am still having the same issue. It happens with both the ‘rpi_ws281x’ module and the ‘board’ module. Any other things I should try?

Not sure if it matters or not, but I am doing everything in a virtual environment.

Thanks for the help, I finally got it working. I posted in the following forum and got a solution.

1 Like