📌 ชื่อสินค้า (Title):
WS2812B RGB LED NeoPixel Ring | ไฟ LED 5V แอดเดรสบิท สำหรับ STM32 Arduino UNO ESP32 NodeMCU
📄 รายละเอียดสินค้า (Description):
WS2812B คือ LED RGB แบบ Addressable (ควบคุมแต่ละดวงได้อิสระ) ทำงานที่แรงดัน 5V นิยมใช้กับบอร์ด Arduino, ESP32, NodeMCU, STM32 สำหรับงานตกแต่ง แสดงผลไฟ ไฟวิ่ง ไฟแสดงสถานะ และงาน DIY IoT
📦 ประเภทสินค้าให้เลือก:
- แบบ PCB จำนวน 4 ดวง
- แบบ PCB จำนวน 1 + 8 ดวง
- แบบ PCB จำนวน 12 ดวง
- แบบ PCB จำนวน 16 ดวง
🔌 คุณสมบัติ:
แรงดันไฟฟ้าใช้งาน: 5V
การควบคุม: Digital, แบบ 1 สาย (Single Wire)
สี: RGB 24-bit แสดงผลได้ 16.7 ล้านสี
ความเร็วสัญญาณ: ~800Kbps
ใช้ร่วมกับไลบรารี Adafruit NeoPixel
ควบคุมได้ทีละดวง (Addressable LED)
✅ ใช้กับอุปกรณ์ต่อไปนี้ได้:
Arduino UNO, Nano, Mega (ไฟขา Output 5V)
NodeMCU, ESP8266,ESP32, STM32 (ไฟขา Output 3.3V) ต้องมี Level shifter ด้วย
ควรต่อ Resistor ค่า 300 - 500 ohm ที่ขา Data_in ของตัวแรก เพื่อเพิ่มความเสถียรและป้องกันไฟกระเพื่อมของขา Data เนื่องจากมีการสลับสัญญาณ HIGH/LOW ด้วยความถี่สูง
✅✅✅รับปรึกษาด้านงานไมโครคอนโทรลเลอร์แลtอิเล็กทรอนิกส์✅✅✅
แนะนำไลบรารี Arduino ตัวอย่างโค้ด
/******************************* Example 1 ***************************************/
#include <Adafruit_NeoPixel.h>
#define PIN A0 // Output pin for data_in
#define NUMPIXELS 16 // Popular NeoPixel ring size
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
}
void loop() {
for(int i=0; i<NUMPIXELS; i++) {
pixels.clear(); // off all pixels
//takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(random(0,255), random(0,255), random(0,255)));
pixels.show(); // Send the updated pixel colors to the hardware.
delay(100); // Pause before next position
}
pixels.clear(); pixels.show(); delay(1); // send off to all pixels.
for(int i=0; i<NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(random(0,255), random(0,255), random(0,255)));
pixels.show();
delay(100);
}
}
/***********************************************************************************/
/******************************* Example 2 ***************************************/
#include <Adafruit_NeoPixel.h>
#define PIN A0 // Output pin for data_in
#define NUMPIXELS 16 // Popular NeoPixel ring size
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
}
void loop() {
/* RED color for all pixels */
for(int i=0; i<NUMPIXELS; i++) {pixels.setPixelColor(i,255,0,0);}
pixels.show(); // Send the updated pixel colors to the hardware.
delay(1000); // Pause before next loop
/* GREEN color for all pixels */
for(int i=0; i<NUMPIXELS; i++) { pixels.setPixelColor(i,0,255,0);}
pixels.show(); delay(1000);
/* BLUE color for all pixels */
for(int i=0; i<NUMPIXELS; i++) { pixels.setPixelColor(i,0,0,255);}
pixels.show(); delay(1000);
}
/***********************************************************************************/
#ws2812b #ledrgb #ledaddressable #ledstrip #ไฟrgb #arduino #esp32 #esp8266 #fastled #neopixel #ไฟตกแต่ง #matrixled #วงแหวนled #led5050 #ไฟควบคุมมือถือ #iot