How to Use WS2812B RGB LEDs with Raspberry Pi Pico (using MicroPython)

preview_player
Показать описание


To follow along you'll need:
• A Raspberry Pi Pico
• WS2812B LEDs (we recommend GlowBit™ rainbow because the version 5 LEDs work reliably with the Pico's 3.3V logic level).
• A way to connect your Pico to your LEDs. I'm using some test clips

Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:

Рекомендации по теме
Комментарии
Автор

Thank you! Three years later and this still works!

pskouson
Автор

I have 2x96 month-old believed-humanoids that I need to get into programming, and this is a great place to start. Thanks.

alrichmond
Автор

Good, always enjoy watching your short tutorials on a mini break... 👍🏻

BABALOOEY
Автор

A bit short, but on the spot and and on target.
Like you way of connecting the Pi nano. I will use that for prototyping, thanks.

AndersJackson
Автор

Where I can buy those cute clips you used to connect led to pico, ?

pratiklondhe
Автор

can you have button input to cycle between a few diff programmed settings so you could just hit a button and get white to see or colour patterns for aesthetics?
I want to just be able to power on and cycle and not have to srat up my pi. wanna encase my pi in a lightbox.

I just googled Coulr Hex and orange was the default colour.

StitchesLovesRats
Автор

Thank you - Another clearly presented tutorial, that stays on-topic :-)

victorldunn
Автор

Are these significantly different than the WS2811?

vaughnmonkey
Автор

is there a way to change colors using a potentiometer or touchscreen display ?

warandv
Автор

Are these Glowbit Rainbows available in the UK ?

daveflatters
Автор

I really want to purchase a glowbit rainbow but shipping to the UK just for one just doesn’t make sense. Do you guys have a partnership with other companies in Europe where I can purchase one? Seems like an amazing little board to play with.

shortymcsteve
Автор

Got any Picos in stock right now? They are hard to get.

brendanfarthing
Автор

So the Pico is the new competitor for the Ardunio or ESP?

cx
Автор

Cool, thanks for showing how simple it is with python!
Can you do the same in C?

crckdns
Автор

Nice video. Are there any other tutorials to show code for sweeping through colours, hue and brightness using analog inputs, for example?

alheeley
Автор

If you're using 4 colour LEDS, e.g. rgbw or grbw then you'll need to change the code to say:
# Example using PIO to drive a set of WS2812 LEDs.

import array, time
from machine import Pin
import rp2

# Configure the number of WS2812 LEDs.
NUM_LEDS = 13
PIN_NUM = 22
brightness = 0.2

@rp2.asm_pio(sideset_init=rp2.PIO.OUT_LOW, out_shiftdir=rp2.PIO.SHIFT_LEFT, autopull=True, pull_thresh=32)
then add a fourth colour to all the data frames and the appropriate bit shifts.

IanSMoyes
Автор

Thanks for the great video, I have a RP2040-Zero from Waveshare that has a built-in WS2812 RGB LED on GP16 but I cannot for the life of me get it working! (using micropython) Any help would be greatly appreciated!

dans-designs
Автор

My ws2812b LED strip is only showing red color and very low brightness. I'm using 15 LEDs only. Any help?

rodrigoramirez
Автор

nice work, but can you give a some working code in C/C++ for using with or without arduino ide for RPI PICO ??? i have no understand how to translate this from python to c and set pio and ws2812b. some help about it ???

KaradevNetLtd
Автор

I think there is a minor bug in the code you used (but I am not sure). In the "Def pixels_show():" function, there is a line: "sm.put(dimmer_ar, 8)". This is a direct copy of the code in the pico manual. But, they were using 8 leds instead of twelve like you are using. But, that "8" might mean something else to the PIO function that I can't figure out since it seems that only 8 leds would have been loaded with this code, and I can see that all twelve of your leds are lit - I am so confused.

MrEdwardhartmann
join shbcf.ru