FastLED: Difference between revisions
Created page with "{{Infobox software | name = FastLED | logo = FastLED-logo.png | caption = FastLED logo | developer = Daniel Garcia, Mark Kriegsman en andere bijdragers | released = 2013 | latest release version = 3.6.0 | latest release date = 15 november 2023 | written in = C++ | operating system = Arduino, ESP8266, ESP32, Teensy, ARM, AVR | genre = Bibliotheek voor adressable LED's | license = MIT License | web..." |
No edit summary |
||
| Line 25: | Line 25: | ||
== Ondersteunde LED-types == | == Ondersteunde LED-types == | ||
| Type | {| | ||
|- | ! Type | ||
| WS2812B | ! Protocol | ||
| SK6812 | ! Opmerkingen | ||
| APA102 | |- | ||
| WS2801 | | WS2812B | ||
| LPD8806 | | NeoPixel | ||
| Meest gebruikte adressable LED | |||
|- | |||
| SK6812 | |||
| NeoPixel | |||
| RGBW-variant met witte LED | |||
|- | |||
| APA102 | |||
| DotStar | |||
| Sneller protocol, vereist kloklijn | |||
|- | |||
| WS2801 | |||
| | |||
| Vereist kloklijn | |||
|- | |||
| LPD8806 | |||
| | |||
| Lagere kleurdiepte, vereist kloklijn | |||
|} | |||
== Installatie == | == Installatie == | ||
| Line 92: | Line 110: | ||
* [[Adressable LED]] | * [[Adressable LED]] | ||
[[ | [[Category:Arduino-bibliotheken]] | ||
[[ | [[Category:Light]] | ||
[[ | [[Category:Open-source software]] | ||
Latest revision as of 10:33, 20 December 2025
FastLED is een open-source softwarebibliotheek voor het aansturen van adressable LED's, zoals WS2812B (NeoPixels), SK6812, APA102 (DotStar), en andere RGB-LED's. De bibliotheek is geoptimaliseerd voor prestaties en biedt een eenvoudige API voor het creëren van complexe lichtpatronen, animaties en effecten. FastLED wordt veel gebruikt in DIY-elektronica, lichtkunst, wearables en interactieve installaties.
Kenmerken
FastLED onderscheidt zich door:
- Hoge prestaties en efficiënt geheugengebruik
- Brede compatibiliteit met verschillende microcontrollers
- Ondersteuning voor kleurcorrectie, gamma-correctie en kleurpaletten
- Actieve community met veel voorbeelden en uitbreidingen
Ondersteunde LED-types
| Type | Protocol | Opmerkingen |
|---|---|---|
| WS2812B | NeoPixel | Meest gebruikte adressable LED |
| SK6812 | NeoPixel | RGBW-variant met witte LED |
| APA102 | DotStar | Sneller protocol, vereist kloklijn |
| WS2801 | Vereist kloklijn | |
| LPD8806 | Lagere kleurdiepte, vereist kloklijn |
Installatie
FastLED kan geïnstalleerd worden via de Arduino Library Manager:
- Open de Arduino IDE
- Ga naar Sketch > Include Library > Manage Libraries
- Zoek naar "FastLED" en installeer de nieuwste versie
Voor handmatige installatie kan de bibliotheek gedownload worden van de [officiële GitHub-pagina](https://github.com/FastLED/FastLED).
Basisgebruik
Om FastLED te gebruiken, voeg je de volgende code toe aan je Arduino-sketch:
#include <FastLED.h>
#define NUM_LEDS 60
#define DATA_PIN 6
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
// Alle LED's rood maken
fill_solid(leds, NUM_LEDS, CRGB::Red);
FastLED.show();
delay(30);
}
Geavanceerde functionaliteit
FastLED biedt geavanceerde functies zoals:
- Kleurpaletten voor animaties
- Noise-functies voor organische effecten
- Power management om overbelasting te voorkomen
- Ondersteuning voor meerdere LED-stroken
Voorbeeld: Regenboog-animatie
void loop() {
static uint8_t hue = 0;
fill_rainbow(leds, NUM_LEDS, hue++, 7);
FastLED.show();
delay(10);
}
Externe links
- [Officiële website](https://fastled.io/)
- [GitHub-repository](https://github.com/FastLED/FastLED)
- [FastLED Wiki](https://github.com/FastLED/FastLED/wiki)
- [FastLED voorbeelden](https://github.com/FastLED/FastLED/tree/master/examples)