Documentation Index
Fetch the complete documentation index at: https://docs.yirenova.com/llms.txt
Use this file to discover all available pages before exploring further.
⭐ 简介
WS2812是一种可编程的LED灯,具有RGB显示效果,可显示的颜色数量为2^24。
⭐ 参数
- 工作温度:-40 ~ 65℃
- 工作电压:3.7 ~ 5.3V
- 工作电流:0.6mA
- PWM频率:2Khz
- 数据速率:800Kbit/s
⭐ 接口

⭐ 尺寸

⭐ 如何使用
在Artikit-ESP32-S3主控板控制下,控制RGB彩灯的闪烁。⭐ 准备
- 硬件
- Artikit-ESP32-S3主控板 x1
- Artikit-RGB模组 x1
- GH1.25连接线 x1
- 12V直流电源 x1
- PC电脑 x1
- 软件
⭐ 连接图

-
需要将Artikit-RGB模组的拨码开关1,调整至ON。
-
打开Arduino的程序编译环境,上传以下代码:
#include <FastLED.h>
#define DATA_PIN 7
#define NUM_LEDS 4
CRGB leds[NUM_LEDS];
uint8_t max_bright = 128;
void setup()
{
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(max_bright);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB::Red;
FastLED.show();
delay(500);
leds[i] = CRGB::Black;
}
}
⭐ 其他资料