Tags:
tag this topic
create new tag
view all tags
---+ The !WS2812B RGB LED shield On this board we have the addressable [[https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf][WS2812B]] RGB LED. This LED is used in many LED chains. <img alt="ws2812b.png" height="149" src="%ATTACHURL%/ws2812b.png" title="ws2812b.png" width="152" /> The board uses D2 (GPIO 4) as data line (or GPIO 21 when running on the ESP32). Since the same line is used as SDA for !I2C modules it cannot be used in conjunction with !I2C shields. *Please note that D2 (GPIO 4) is also used as !I2C SDA signal. For this reason the !WS2812B cannot run together with an !I2C shield.* From the software point of view a driver is already available in the micro Python library named neopixel. Accessing the !WS2812B using this driver is the pretty simple. Here is a program demonstrating this: https://github.com/uraich/MicroPython_IoTDemos/blob/master/drivers/ws2812bLED/ws2812.py Be careful with this LED and do not look into into when it emits light with full intensity. The light is so intense that you may damage your eyes! In Cayenne we can define 3 sliders which control the intensity of each color component. The program subscribing top the slider control channels and driving the LEDs correspondingly is found here: https://github.com/uraich/MicroPython_IoTDemos/blob/master/cayenne/ws2812b/cayenneWS2812B.py There is also a little program simply switching the LED off: https://github.com/uraich/MicroPython_IoTDemos/blob/master/cayenne/ws2812b/switchOff.py -- %USERSIG{UliRaich - 2019-03-22}% ---++ Comments %COMMENT%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
ws2812b.png
r1
manage
40.1 K
2019-03-22 - 13:56
UliRaich
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r3 - 2019-05-17
-
UliRaich
Home
Site map
AFNOG web
Embedded_Systems web
IoT_Course_English web
IoT_Course_French web
Main web
Sandbox web
TWiki web
AFNOG Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback