CM Panel technical documentation Buy

Using the WS2812B led on CM-Panel

This article illustrates how to use the WS2812B led on CM3-Panel

Wiring

Wire the DIN line on pin 40 (GPIO 40) of CM-Panel extension connector

Led Strip EXP1
+5V 5V0
DIN 40
GND GND

Overlay

Insert in /boot/config.txt this line:

dtoverlay=pwm-2chan,pin=40,func=4,pin2=41,func2=4

Software

Clone this repository

git clone https://github.com/jgarff/rpi_ws281x

Move inside the rpi_ws281x directory:

cd rpi_ws281x

Install scons by typing:

sudo apt update
sudo apt install scons

Launch scons

scons

Then launch

sudo ./test

What is rpi_ws281x ?

Userspace Raspberry Pi library for controlling WS281X LEDs.

What is SCons ?

SCons is an Open Source software construction tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software.

Home page CM Panel technical documentation Buy