Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:extensions:neopixel [2018/08/21 10:43]
kniwwelino
en:extensions:neopixel [2018/08/21 12:18] (current)
kniwwelino [Programming the LEDs]
Line 1: Line 1:
 +====== Adding external Neopixel (WS2812) LEDs ======
  
 +===== Connecting the Neopixel (WS2812) LEDs =====
 +
 +There are plenty of different versions of Neopixel and WS2812 boards/strips available. They all work more or less the same.
 +Normally the first LED of a board or strip is accessible via the DI pin. The DO output pin of the first LED is connected to the DI input of the next LED. That way all LEDs are connected in a row. You can address them by counting the number of LED - the first LED is number 0.
 +
 +All boards/strips have at least the following four connectors: VCC/5V, GND, DI, DO.
 +
 +  * **3.3V** pin of the Kniwwelino Board connects to the **+5V** pin of the LED board/strip
 +  * **GND** pin of the Kniwwelino Board connects to the **GND** pin of the LED board/strip
 +  * **D5/D6/D7** pin of the Kniwwelino Board connects to the **DI** pin of the LED board/strip
 +
 +If you want to connect more boards, the DO pin of the first board needs to be connected to the DI pin of the next board. VCC and GND need to be connected to all boards.
 +
 +
 +===== Programming the LEDs =====
 +
 +First you need to specify how many LEDs you want to connect and which pin you want to use. This block is absolutely nessessary if you want to use the Neopixel LEDs.
 +
 +{{:en:extensions:neopixel:neopixel_1.png|}}
 +
 +You can either set the color of all LEDs at once, or one color per LED.
 +
 +{{:en:extensions:neopixel:neopixel_3.png|}}
 +{{:en:extensions:neopixel:neopixel_4.png|}}
 +
 +There are plenty of predefined effects that shown fancy rainbows, sparkles etc.. on your connecte LEDs.
 +
 +{{:en:extensions:neopixel:neopixel_2.png|}}
 +
 +You can although change the brightness of all LEDs and the speed of the effect.
 +
 +{{:en:extensions:neopixel:neopixel_6.png|}}
 +{{:en:extensions:neopixel:neopixel_5.png|}}
 +
 +For example, to change the effect and color of the LEDs with the Kniwwelino buttons, you could use the following blocks:
 +
 +{{:en:extensions:neopixel:neopixel_7.png}}
 +
 +<color #ed1c24>Please make sure to not use any wait blocks in your "repeat forever" block, otherwise the LED effects will get very slow.</color>
 +
 +<color #ed1c24>If you want to use a bigger number of LEDs (>10) you need to power them with an external 5V source. See https://learn.adafruit.com/adafruit-neopixel-uberguide/powering-neopixels for more information.</color>
  • en/extensions/neopixel.txt
  • Last modified: 2018/08/21 12:18
  • by kniwwelino