Tutorial 06 - Light up the WS2812 RGB LED - ADA031-V5.0
Adeept · Uploaded · 2:24 · Watch on YouTube
Adeept walks through driving the two WS2812 RGB LEDs on its robotic arm control board from example code. The lesson covers a blue breathing effect and multi-color switching, and explains how the code sets each color channel's brightness.
Transcript
Captions as a .vtt fileEmbed with the transcript
- 0:04This lesson introduces WS2812 LEDs and demonstrates how to achieve various lighting effects with WS2812 using example programs.
- 0:15Required Components, Robotic Arm Control Board, USB Cable
- 0:20The robotic arm control board has two WS2812 LEDs integrated on it.
- 0:27Each WS2812 LED contains red, green and blue LEDs.
- 0:32By adjusting the brightness of these three LEDs, the WS2812 can produce a wide range of colors.
- 0:41The WS2812 is connected to pin D11 of the microcontroller.
- 0:46Each WS2812 LED is controlled via a one-wire serial bus.
- 0:54Let's start the demonstration.
- 0:56First, connect the control board to your computer with a USB cable.
- 1:05Next, open the example code.
- 1:07Select the board type and serial port, then upload the program to the control board.
- 1:30After successful upload, the two WS2812 LEDs on the control board will show a blue breathing light effect.
- 1:38Code Principle
- 1:39Initialize the WS2812 instance.
- 1:43Inside the loop, set RGB values and adjust the brightness of the three color LEDs to create the breathing light effect for WS2812 LEDs.
- 1:53We also provide another example program that makes the WS2812 LEDs switch between multiple colors.
- 2:14Once you master the control principle of WS2812, you can create more stunning lighting effects.
Discussion
A mail when somebody comments. No account needed.
The newsletter
Get our free newsletter with new robots, prices and robotics news.