Stap 3: Bibliotheek en code
De eerste ting is de Adafruit neopixel bibliotheek importeren. Zie de Adafruit GitHub pagina: https://github.com/adafruit/Adafruit_NeoPixel
of Adafruit sitepagina om direct downloaden en installeren info:
https://Learn.adafruit.com/adafruit-neopixel-uberg...
De bibliotheek in de map ' Bibliotheek ' in de Arduino projectmap plaatsen
Na download het PL9823 bestand en uploaden naar de Arduino UNO.
Zoals u door de code zien kunt is het belangrijkste ding de regel:
Adafruit_NeoPixel strip = Adafruit_NeoPixel (NUM_PIXELS, PIN, NEO_RGB + NEO_KHZ400);
De "NEO_GBR" is voor de WS2812b leds model, de NEO_RGB is voor dit model. De snelheid van communicatie is NEO_KHZ400 voor de WS2812 800.