**** READ DESCRIPTION BEFORE WATCHING VIDEO ****
In this video, we show you how to power a LED strip with the Raspberry Pi directly using one of the Pi's GPIO pins. This is not the safest practice, because it can damage the Pi. The reason is that the LED strip may draw too much current from the Raspberry Pi. If you are only lighting the LED strip for a short amount of time, not using a strip with many LEDs, or constantly monitoring the temperature of the Pi while powering the LED strip, then the approach used in this video should be okay. However, if the Pi gets too hot, the LED strip has a lot of LEDs, or the strip is going to be powered for a long time, then I would recommend using a external power supply that is rated the same voltage as your LED strip and make sure it has plenty of current to draw from. If using an external power supply, then follow the wiring from this picture: cdn-learn.adafruit.com/assets...
For more info on the wiring: learn.adafruit.com/neopixels-...
The code should still be the same as in this video.
Materials used in this video:
Raspberry Pi 4 Board Only: www.amazon.com/dp/B07TC2BK1X/
WS2812B LED Strip: www.amazon.com/dp/B01MQ08JH6/
Breadboard Jumper Wires: www.amazon.com/dp/B07GD2BWPY/
Soldering Iron Kit: www.amazon.com/dp/B07S61WT16/
Helping Hand for Soldering: www.amazon.com/dp/B002PIA6Z4/
The wiring goes as follows:
5V pin on the Pi goes with the 5V pad on the LED strip
Gnd pin on the Pi goes with the GND pad on the LED strip
GPIO pin 18 goes with the DI pad on the LED strip
Link to the wiring: cdn-learn.adafruit.com/assets...
Link to the code: gist.github.com/chris-gong/fb...
How to support the channel:
Get a shirt or sweatshirt with free shipping (Use code "SHIP" at checkout): teespring.com/stores/flopperam
Become a member: / @flopperam
Support us on Patreon: / flopperam
Donate to our PayPal: www.paypal.me/flopperam
Sponsor us on Github: github.com/sponsors/chris-gong
Social media links:
Discord: / discord
Twitter: / flopperam
Instagram: / flopperam
Facebook: / flopperam
0:00 Wiring setup
0:38 Writing a Python script
6:50 Running the Python script
#raspberrypi #ledstrip
Негізгі бет Ғылым және технология How to control a WS2812 LED Strip with a Raspberry Pi in Python
Пікірлер: 153