# Arduino 驅動 RGB Led 燈條函式庫 ## 簡介 ## FastLED 是一款功能強大,簡單易用的控制 WS2812, LPD8806, 等 LED 光帶的 Arduino 第三方庫。目前 FastLED 是公認的 Arduino 開發者應用最為廣泛的 LED 控制庫之一。 它的主要開發者是 Daniel Garcia 以及 Mark Kriegsman。如需要獲得更多關於這函式庫的最新介紹,您也可以訪問 [FastLED 官方網站](http://fastled.io/)。 ## Adafruit NeoPixel Library https://github.com/adafruit/Adafruit_NeoPixel NeoPixel 是 arduino 控制 led 燈條的函式庫,是由 Adafruit Industries 的 Phil “Paint Your Dragon” Burgess 編寫,PJRC,Michael Miller 和其他開源社群的成員對此進行了貢獻。 如果想要找尋 使用這函式庫的參考作品,請見下方連結: https://learn.adafruit.com/search?q=neopixel 使用的教學影片請見: https://youtu.be/EvRxQbhDxCo?t=327 [Adafruit NeoPixel Library](https://adafruit.github.io/Adafruit_NeoPixel/html/index.html) ## [WS2812FX](https://github.com/kitesurfer1404/WS2812FX) 這個函式庫擁有 WS2811/WS2812/NeoPixel LED 的各種閃爍效果。它旨在替代具有附加功能的 Adafruit NeoPixel 函示庫。 特徵 * 55 種不同的效果。併計數。 * 已經在 Arduino Uno/Micro/Nano/Leonardo 和 ESP8266/ESP32 上測試。 * 所有具有可輸出名稱的效果 - 易於在使用者介面中使用。 * FX、速度和亮度可即時控制。 * 準備好聲音到燈光(參見外部觸發示例) ## 函式庫比較 [ESP32: FastLED vs. NeoPixelBus vs. NeoPixel Library](https://blog.ja-ke.tech/2019/06/02/neopixel-performance.html) 三種最流行的用於驅動 WS2812B RGB LED 的函式庫性能比較。都用邏輯分析儀進行了測量,以規避偏差 millis ()(因為某些函式庫禁用了中斷)。 ## 燈條 產品名稱:WS2812內置IS幻彩燈帶 額定功率:5V 燈珠數量:30燈,60燈,144燈 線路底板:白色/黑板 LED光源:SMD5050 防水級別:裸管不防水,滴膠防水、套管防水 ## 參考資料 [如何使用 FastLED 和 Arduino 控制 WS2812B RGB LED](https://youtu.be/EcMKditEVtY) [FastLED 函式庫](http://www.taichi-maker.com/homepage/reference-index/arduino-library-index/fastled-library/) [Arduino – Controlling a WS2812 LED strand with NeoPixel or FastLED](https://www.tweaking4all.com/hardware/arduino/arduino-ws2812-led/?fbclid=IwAR3gqMSoJlik0eZbkFel8EPih1Lj7vQNQOOrxfKt-soWxbB7G6Q_H2c01vA) [一個朋友的願望 – WS2812 5050 5V LED](https://makeryan.wordpress.com/2017/11/20/%E4%B8%80%E5%80%8B%E6%9C%8B%E5%8F%8B%E7%9A%84%E9%A1%98%E6%9C%9B-ws2812-5050-5v-led/) [WS2812 Intelligent control LED integrated light source](https://cdn-shop.adafruit.com/datasheets/WS2812.pdf?fbclid=IwAR2GzW1UEqvb6KjNbi66xsZffJn4WCiuI6ZJr-76mm8gNnBOrvLaKeaOEhw) [NOV201509 Arduino – LEDStrip effects for NeoPixel and FastLED](https://www.tweaking4all.com/hardware/arduino/adruino-led-strip-effects/#LEDStripEffectTheatreChase) [NeoPixels, How Do They Work?](https://www.hackster.io/BuildItDR/neopixels-how-do-they-work-f1152a) ### 採購 [光華商場利昇行](https://shopee.tw/disabled0708?categoryId=73&itemId=3631471695) 台北市市民大道三段 8 號 5 樓 33 室 營業時間 AM11:00-PM21:00. 電話 02-23216207 [发光 ws360led 柔性全彩灯带 2812 硅胶防水 5v 软灯条圆形度霓虹灯 60 珠](https://item.taobao.com/item.htm?id=624850853840) [WS2811 WS2812 10*23MM 硅膠低壓霓虹燈 5V12V24V LED 柔性燈帶](https://www.ruten.com.tw/item/show?22203839787203) [LED 霓虹灯招牌制作工艺汇总集合](https://youtu.be/icQ2NopJIUo) 裡面的燈條彎折加工技巧分享可以學到很多。 [EP 2 - 第二集 JOEL'S CRAFT,DIY自己的霓虹灯!?会难么?贵不贵?!](https://youtu.be/fRgpp2iI2c0)