The WS2812 LED strip requires a 5V signal on the Data In pin. The LEDs either won't work or will be flaky if you connect them directly to your Pico. The WS2812B data sheet states Vin H (min) = 0.7Vdd. In other words, it needs at least a 3.5V signal.
You need to use a level converter such as a 74LVC245 or a BSS138 MOSFET-based one. The latter are widely sold on Amazon, eBay, Pi Hut etc. I have successfully used one. I connected a1K2 resistor between the high-side output and 5V to improve the rise time. The waveform looked good on a scope. It "just worked".
Another consideration is the current that your LED strip can draw. According to your Amazon link, it can draw up to 300mw (i.e. 60mA) per LED. Your strip of 300 LEDs could draw up to 18A. Micro USB connectors are rated at about 1.8A and very few USB ports will supply more than 900mA. So, unless you are playing with just a few LEDs, you will need an external power supply.
FWIW, I used the Pimoroni version of MicroPython because I think their NeoPixel library (plasma library) is better than the official one. Their web site also has a nice tutorial that will get you started.
Good luck and enjoy!
You need to use a level converter such as a 74LVC245 or a BSS138 MOSFET-based one. The latter are widely sold on Amazon, eBay, Pi Hut etc. I have successfully used one. I connected a1K2 resistor between the high-side output and 5V to improve the rise time. The waveform looked good on a scope. It "just worked".
Another consideration is the current that your LED strip can draw. According to your Amazon link, it can draw up to 300mw (i.e. 60mA) per LED. Your strip of 300 LEDs could draw up to 18A. Micro USB connectors are rated at about 1.8A and very few USB ports will supply more than 900mA. So, unless you are playing with just a few LEDs, you will need an external power supply.
FWIW, I used the Pimoroni version of MicroPython because I think their NeoPixel library (plasma library) is better than the official one. Their web site also has a nice tutorial that will get you started.
Good luck and enjoy!
Statistics: Posted by paulg1 — Sun Dec 08, 2024 11:42 am