RoboGeeks

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

  1. 0:04This lesson introduces WS2812 LEDs and demonstrates how to achieve various lighting effects with WS2812 using example programs.
  2. 0:15Required Components, Robotic Arm Control Board, USB Cable
  3. 0:20The robotic arm control board has two WS2812 LEDs integrated on it.
  4. 0:27Each WS2812 LED contains red, green and blue LEDs.
  5. 0:32By adjusting the brightness of these three LEDs, the WS2812 can produce a wide range of colors.
  6. 0:41The WS2812 is connected to pin D11 of the microcontroller.
  7. 0:46Each WS2812 LED is controlled via a one-wire serial bus.
  8. 0:54Let's start the demonstration.
  9. 0:56First, connect the control board to your computer with a USB cable.
  10. 1:05Next, open the example code.
  11. 1:07Select the board type and serial port, then upload the program to the control board.
  12. 1:30After successful upload, the two WS2812 LEDs on the control board will show a blue breathing light effect.
  13. 1:38Code Principle
  14. 1:39Initialize the WS2812 instance.
  15. 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.
  16. 1:53We also provide another example program that makes the WS2812 LEDs switch between multiple colors.
  17. 2:14Once you master the control principle of WS2812, you can create more stunning lighting effects.
Embed this video with its transcript

Paste this into your page. The frame holds the player and the transcript; the link below it says where the transcript comes from.

Discussion

You pick a name in the next step. Already a member? Log in.

A mail when somebody comments. No account needed.

The newsletter

Get our free newsletter with new robots, prices and robotics news.