[BASIC] 003 SET LED COLOR RGB (เปลี่ยนสีไฟ RGB LED)
void setup(){
...
lemon.setBrightnessLED(50); // ปรับความสว่างที่ 50 (0-255)
...
}lemon.setColorLED( no_led , lv_red , lv_green , lv_blue );
// no_led เช่น 1,2,3,4,5,6
// lv_red เป็นการระบุว่าต้องการแสดงสีแดงเท่าไหร่ (0-255)
// lv_green เป็นการระบุว่าต้องการแสงสีเขียวเท่าไหร่ (0-255)
// lv_blue เป็นการระบุว่าต้องการแสงสีน้ำเงินเท่าไหร่ (0-255)lemon.setColorLED( 1, 255, 0, 0); // ให้หลอดที่ 1 เป็นสีแดง// แบบที่ 1 สายถึก
lemon.setColorLED( 1, 255, 0, 0); // ให้หลอดที่ 1 เป็นสีแดง
lemon.setColorLED( 2, 255, 0, 0); // ให้หลอดที่ 2 เป็นสีแดง
lemon.setColorLED( 3, 255, 0, 0); // ให้หลอดที่ 3 เป็นสีแดง
lemon.setColorLED( 4, 255, 0, 0); // ให้หลอดที่ 4 เป็นสีแดง
lemon.setColorLED( 5, 255, 0, 0); // ให้หลอดที่ 5 เป็นสีแดง
lemon.setColorLED( 6, 255, 0, 0); // ให้หลอดที่ 6 เป็นสีแดงLast updated
Was this helpful?