| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
DFR0605 bảng dữ liệu(PDF) 6 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0605 bảng dữ liệu(HTML) 6 Page - DFROBOT |
|
6 / 9 page ![]() void colorWipe(uint32_t c, uint16_t wait) { for (uint16_t i = 0; i < RGB_Strip.numPixels(); i++) { RGB_Strip.setPixelColor(i, c); RGB_Strip.show(); delay(wait); } } void rainbow(uint8_t wait) { uint16_t i, j; for (j = 0; j < 256; j++) { for (i = 0; i < RGB_Strip.numPixels(); i++) { RGB_Strip.setPixelColor(i, Wheel((i + j) & 255)); } RGB_Strip.show(); delay(wait); } } // Input a value 0 to 255 to get a color value. // The colours are a transition r ‐ g ‐ b ‐ back to r. uint32_t Wheel(byte WheelPos) { if (WheelPos < 85) { return RGB_Strip.Color(WheelPos * 3, 255 ‐ WheelPos * 3, 0); } else if (WheelPos < 170) { WheelPos ‐= 85; return RGB_Strip.Color(255 ‐ WheelPos * 3, 0, WheelPos * 3); } else { WheelPos ‐= 170; return RGB_Strip.Color(0, WheelPos * 3, 255 ‐ WheelPos * 3); } } Results The module first displays the three primary colors "red", "green", "blue", and then displays four custom mixed colors "yellow", "purple", "green", "white", each color is displayed for 1 second, and then the "Rainbow" effect. This pattern will repeat forever. To adjust LED brightness, change the value "128" in the function RGB_Strip.setBrightness(128); // Set brightness, 0‐255 (darkest ‐ brightest) |
|
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |