Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WS2812b LEDs with unusal GRB mapping #7

Closed
phedders opened this issue Jan 30, 2017 · 9 comments
Closed

WS2812b LEDs with unusal GRB mapping #7

phedders opened this issue Jan 30, 2017 · 9 comments
Labels
enhancement Type - Enhancement that will be worked on help needed Action - Asking for help from the community

Comments

@phedders
Copy link

Is there an easy way to configure an LED string that is mapped weirdly - where Red and Green are swapped?

I was wondering about adding another LedTable.

Apologies if I missed the obvious. I'm on 3.9.7 IIRC.
And again many thanks for an awesome fw!

@arendst
Copy link
Owner

arendst commented Jan 30, 2017

As a test change the colortype in xdrv_ws2812.ino from

NeoGrbFeature

into

NeoRgbFeature

and see what happens.

@arendst arendst added the help needed Action - Asking for help from the community label Jan 30, 2017
@phedders
Copy link
Author

What a pain.

I changed line 34 - and tried that - no change - but then I'm not using pin3

I cannot change 36 because (I think) that feature is not compatible with the bitbang lib (I've hit that before on my code)

/home/prh/Sonoff-Tasmota/sonoff/xdrv_ws2812.ino: In function 'void ws2812_init()':
/home/prh/Sonoff-Tasmota/sonoff/xdrv_ws2812.ino:462:9: error: cannot convert 'NeoPixelBus<NeoGrbFeature, NeoEsp8266BitBangMethodBase >' to 'NeoPixelBus<NeoRgbFeature, NeoEsp8266BitBangMethodBase >' in assignment

I'll try using DMA (pin 3/rx)

@arendst
Copy link
Owner

arendst commented Jan 30, 2017

You'll have to change lines 34, 36 , 460 and 462!

Compiling works for me...

@phedders
Copy link
Author

Tried on GPIO03 - and still RG are swapped:

FTR I also set in user_config.h:

129 #define USE_WS2812 // WS2812 Led string support (+8k code, +1k mem)
130 #define USE_WS2812_DMA // DMA supports only GPIO03 (= Serial TXD) (+1k mem)

Thanks Theo.

@phedders
Copy link
Author

OK I'm an idiot - changed all of those occurrences and it does work just fine with RG swapped 👍
Thanks for your patience. Do you think this could be configurable?

arendst added a commit that referenced this issue Jan 30, 2017
3.9.10 20170130
* Add WS2812 Color Type selection (RGB or GRB) to user_config.h (#7)
* Hue api changes to support HUE App(s) (#8)
@arendst arendst added the enhancement Type - Enhancement that will be worked on label Jan 30, 2017
@arendst
Copy link
Owner

arendst commented Jan 30, 2017

Fixed in version 3.9.10 just released

@arendst arendst closed this as completed Jan 30, 2017
@phedders
Copy link
Author

You're amazing - Thanks for such a quick response. Would it be possible to configure on a running system? I have a mix of 2812's and of course most are GRB - just a few RGB (the traditional LED shape ones) and it would be nice to have one firmware image for them all.

If that is not possible I totally understand :)

@arendst
Copy link
Owner

arendst commented Jan 30, 2017

Looked at it and it's just too much overhead as a new object needs to be defined Makuna/NeoPixelBus#103

@phedders
Copy link
Author

Oh thats a shame - thanks again.

ascillato added a commit that referenced this issue Jun 5, 2018
arendst pushed a commit that referenced this issue Jul 21, 2018
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
3.9.10 20170130
* Add WS2812 Color Type selection (RGB or GRB) to user_config.h (arendst#7)
* Hue api changes to support HUE App(s) (arendst#8)
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 7, 2018
arendst pushed a commit that referenced this issue Oct 6, 2019
arendst pushed a commit that referenced this issue Jan 6, 2021
mepunit added a commit to shivankittech/smart-home-base-firmware that referenced this issue Aug 18, 2021
GwangrokBaek referenced this issue in zigbang/Tasmota Aug 19, 2021
로딩중 에러 해결 및 종류 변경
GwangrokBaek referenced this issue in zigbang/Tasmota Mar 31, 2022
로딩중 에러 해결 및 종류 변경
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on help needed Action - Asking for help from the community
Projects
None yet
Development

No branches or pull requests

2 participants