Introduction
Shine like rainbows, this full-color RGB LED Ring with an exquisite and cool appearance could be a great partner for your interactive applications. Add it to your project to brighten your creativity! Combining with sensors, it could turn into a compass that tells direction, a cool clock, a tomato timer, a countdown timer… It could also be a turntable lottery machine used in games, colorful decoration for robots, etc. Come and unlock more fun ways to play with this colorful RGB LED ring by cascading it.
Specification
- Supply voltage: 3.3-5V
- Interface type: PH2.0-3P
- Interface function: cascade multiple lamp rings through the interface
Dimension
Pinout
RGB LED ring pinout diagram:
Num | Label | Description |
---|---|---|
1 | D | Digital signal port |
2 | + | VCC |
3 | - | GND |
Note: For the silkscreen of the port, IN and OUT represents input and output terminals respectively.
1. Mind+ Programming
User Guide
The extension library of the RGB LED command needs to be added before using the RGB LED ring. Open Mind+ platform, click "Extensions" in the bottom right corner, and in the "MCU" menu bar, select "micro:bit", the MCU to be used. Then find "WS2812 RGB LED" in the "Display" menu bar and click it to add the RGB LED extension library, then the display module will appear in the command area.
Application Sample (RGB LED Ring - 12)
Project 1: Dazzling Neon Light
Project Introduction
Display color gradients of the 12 LED beads. The color of the lamp bead changes by one level successively around the circle to form a rotating effect as if it’s a dynamic rainbow.
Hardware Preparation
- micro:bit × 1
- IO Expansion Board × 1
- RGB LED Ring- 12 LED Beads × 1
Hardware Connection
Program Screenshot
Project 2: LED Ring Cascade
Method to cascade LED ring
It’s easy to cascade the LED ring. Just connect the OUT port of the first lamp ring to the IN port of the second lamp ring through the PH2.0-3P male-to-male cable.
Note: When using the cascaded lamp ring, the power supply may be unstable due to excessive beads, which can be resolved by using a 5V or external power supply.
Product Introdution
To achieve a dazzling neon light effect similar to project 1 by cascading three types of LED rings.
Hardware Preparation
- micro:bit × 1
- IO Expansion Board × 1
- RGB LED ring- 12 LED beads × 1
- RGB LED ring- 16 LED beads × 1
- RGB LED ring- 24 LED beads × 1
- PH2.0-3P digital cable × 1
- PH2.0-3P male-to-male cable × 1
Program Screenshot
Project 3: LED Ring Clock
Product Introduction
Clocks serve as timers in our daily routine. The most general clocks are electronic and quartz clocks. Let’s use the LED ring module to design a unique clock.
Hardware preparation
- micro:bit × 1
- IO Expansion Board × 1
- RGB LED ring- 12 LED beads × 1
- RTC real-time clock module × 1
Hardware Connection
Program Screenshot
Application Sample (RGB LED Ring- 24)
Project 4: LED Ring Compass
Project Introduction
The compass is designed to tell the direction, and nowadays smartphones commonly are equipped with a compass software to help us determine the North Pole based on the geomagnetic field. Let's do a compass project using RGB LED ring with micro:bit, thus explore the connection between it and us.
Hardware Preparation
- micro:bit × 1
- IO Expansion Board × 1
- RGB LED Ring- 24 LED beads × 1
Hardware Connection
Program Screenshot
Project 5: Rainbow Breathing LED Ring
Project Introduction
The breathing light is the light controlled to gradually change from bright to dark and then from dark to bright, which feels like breathing at a certain tempo. We will employ the RGB LED ring to make a rainbow breathing ring feasting your eyes.
Hardware Preparation
- micro:bit × 1
- IO Expansion Board × 1
- RGB LED Ring- 12 LED beads × 1
Hardware connection
Program Screenshot
2. Makecode Programming
User Guide
Click the extensions in MakeCode and add the lamp strip library into the extensions.
Project 1: RGB Palette
Project Introduction
We are all familiar with RGB and know that mixing blue with green will turn into yellow. RGB color model is based on the principle of getting 16 million different colors by mixing three colors. Let the RGB ring serve as our color palette and mix the color that satisfies us the most.
Hardware Preparation
- micro:bit × 1
- IO Expansion Board × 1
- RGB LED Ring- 12 LED beads × 1
- Analog Rotation Sensor × 3
Hardware Connection
Program Screenshot
Project 2: Tomato Timer
Project Introduction
Pomodoro Technique is a easy way to manage your time. The time can be set to 25 minutes, during which you focus on one thing until the clock goes off, and then take a five-minute break. This is actually a 25-minute timer. Press button A: the buzzer turns off and stops the timer.
Hardware Preparation
- micro:bit × 1
- IO Expansion Board × 1
- RGB LED Ring- 24 LED beads × 1
Hardware Connection
Program Screenshot
3. Arduino Programming
User Guide
(1) Import the library file of RGB LED into Arduino library first, find the installation location of Arduino, and put the file of RGB LED ring into the libraries of Arduino.
(2) Before using the RGB LED ring, enter Arduino and click "Toolbar- Development Board" (as shown in the picture)
Project 1: LED Brightness Adjustment
Project Introduction
The brightness of the RGB LED ring can be adjusted from 0 to 255. Let's employ the analog rotation sensor to adjust the brightness in the way of mapping the analog value of the sensor into the brightness of the RGB LED ring.
Hardware Preparation
- Analog Rotation Sensor × 1
- RGB LED ring- 12 LED beads × 1
- Arduino uno × 1
- IO Expansion Board × 1
Hardware Connection
Sample Code
/*!
* @file RGB ring.ino
* @brief The colors of the 12 lamp beads are displayed in gradients. Adjust the brightness of the RGB LED ring using the analog rotation sensor.
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @author [qsjhyy](fengying.nie@dfrobot.com)
* @version V0.1
* @date 2021-09-24
* @get from https://www.dfrobot.com
* @url
*/
#include <DFRobot_NeoPixel.h>
// Dynamic variable
volatile float brightness;
// Create an Object
DFRobot_NeoPixel neoPixel_2;
// Main program start
void setup() {
neoPixel_2.begin(2, 24);
brightness = 0;
}
void loop() {
neoPixel_2.setBrightness((map(brightness, 0, 749, 0, 255)));
neoPixel_2.showRainbow(0, 23, 1, 360);
brightness = analogRead(A0);
}
Project 2: Dazzling Neon Light
Project Introduction
The colors of the 24 lamp beads are displayed in gradients and change by levels successively around the circle every 0.1s to form a rotating effect as if it’s a dynamic rainbow.
Hardware Preparation
- RGB LED ring- 24 LED beads × 1
- Arduino uno × 1
- IO Expansion Board × 1
Hardware Connection
Sample Code
/*!
* @file RGB ring.ino
* @brief The colors of the 24 lamp beads are displayed in gradients and change by levels successively around the circle to form a rotating effect as if it's a dynamic rainbow.
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @author [qsjhyy](fengying.nie@dfrobot.com)
* @version V0.1
* @date 2021-09-24
* @get from https://www.dfrobot.com
* @url
*/
#include <DFRobot_NeoPixel.h>
// Create a object
DFRobot_NeoPixel neoPixel_2;
// Main program start
void setup() {
neoPixel_2.begin(2, 24);
neoPixel_2.showRainbow(0, 24, 1, 360);
}
void loop() {
delay(10);
neoPixel_2.rotate(1);
}
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.