SunFounder Thales Kit for Raspberry Pi Pico, Release 1.0
3.4.18 RGB LED Strip
WS2812 is a intelligent control LED light source that the control circuit and RGB chip are integrated in a package of
5050 components. It internal include intelligent digital port data latch and signal reshaping amplification drive circuit.
Also include a precision internal oscillator and a 12V voltage programmable constant current control part, effectively
ensuring the pixel point light color height consistent.
The data transfer protocol use single NZR communication mode. After the pixel power-on reset, the DIN port receive
data from controller, the first pixel collect initial 24bit data then sent to the internal data latch, the other data which
reshaping by the internal signal reshaping amplification circuit sent to the next cascade pixel through the DO port.
After transmission for each pixelthe signal to reduce 24bit. pixel adopt auto reshaping transmit technology, making
the pixel cascade number is not limited the signal transmission, only depend on the speed of signal transmission.
Wiring
1. Connect the +5V of the LED Strip to the VBUS of the Pico.
2. Connect the GND of the LED Strip to the GND of the Pico.
3. Connect the DIN of the LED Strip to the GP0 of Pico.
Warning:
One thing you need to pay attention to is current.
Although the LED Strip with any number of LEDs can be used in Pico, the power of its VBUS pin is limited. Here,
we will use eight LEDs, which are safe. But if you want to use more LEDs, you need to add a separate power
supply.
Code
The following is the library of ws2812 packaged by Sunfounder. You need to save it in Pico and name it as
ws2812.py
for use as a library.
import
array
,
time
import
rp2
from
rp2
import
PIO, StateMachine, asm_pio
@asm_pio
(sideset_init
=
PIO
.
OUT_LOW, out_shiftdir
=
PIO
.
SHIFT_LEFT, autopull
=
True
, pull_
˓
→
thresh
=
24
)
(continues on next page)
106
Chapter 3. For MicroPython User
Содержание Thales Kit
Страница 1: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 Jimmy SunFounder Jun 04 2021 ...
Страница 2: ......
Страница 4: ...ii ...
Страница 6: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 2 CONTENTS ...
Страница 10: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 6 Chapter 1 Introduction to Raspberry Pi Pico ...
Страница 12: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 8 Chapter 2 What is Included in This Kit ...
Страница 13: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 2 1 Components List 2 1 Components List 9 ...
Страница 42: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 38 Chapter 2 What is Included in This Kit ...
Страница 140: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 136 Chapter 3 For MicroPython User ...
Страница 164: ...SunFounder Thales Kit for Raspberry Pi Pico Release 1 0 160 Chapter 4 For Arduino User ...