![]() |
Forum Index : Electronics : WS2812 BGR possible instead of RGB?
Author | Message | ||||
wolfme Newbie ![]() Joined: 26/10/2021 Location: GermanyPosts: 31 |
Is it possible to drive BGR WS2812 LEDs? SetPin GP16, DOUT WS2812 B, GP16, 1, RGB(red) lights up the LED green and SetPin GP16, DOUT WS2812 B, GP16, 1, RGB(green) lights up the LED red |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2374 |
@Mixtel90 also found some with wrong colours.https://www.thebackshed.com/forum/ViewTopic.php?TID=17173&PID=225831#225831#225831 Though he didn't show his solution it would just require transposing the colours. See if this works OriginalColour = RGB(red,green,blue) TransposedColour =((OriginalColour >> 8)And &HFF00)+((OriginalColour<<8)And &HFF0000)+((OriginalColour)And &HFF) WS2812 B, GP16, 1, TransposedColour |
||||
wolfme Newbie ![]() Joined: 26/10/2021 Location: GermanyPosts: 31 |
That works, thanks very much! |
||||
![]() |