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

Consume similar payloads to Neopixel LED packets #39

Open
Just-another-pleb opened this issue Jul 12, 2019 · 5 comments
Open

Consume similar payloads to Neopixel LED packets #39

Just-another-pleb opened this issue Jul 12, 2019 · 5 comments

Comments

@Just-another-pleb
Copy link

Although getting away from a "simple" LED, the NEOPIXELs are popular.

For people wanting to simulate a Neopixel LED, adding that to the LED would/may/could be nice.

The input would be the same as the NeoPixel LEDs so as to maintain a standard so any code could easily be ported to the real ones.

@yoiang
Copy link
Member

yoiang commented Jul 12, 2019

Can you describe what you would imagine a Neopixel like LED node would look and behave like?

@Just-another-pleb
Copy link
Author

Just-another-pleb commented Jul 12, 2019

From the GUI side of things, just the same as the now existing ui_LED.

It would only need 1 input (the power pins are a given)
and 1 output. As they are chainable.

You would send it a message with the RGB values from 0 - 128, as per the NexPixels, and it would display that value.

Alas it would go away from accepting names for colours, so maybe it may be better it is a whole new node as I do use colour names when I configure the existing ui_LED node.

Maybe - rather than sending it NeoPixel packets - you could send it a message something like:

msg.payload = {N: (value),R: (value), G: (value), B: (value)};

Where N is the number of the LED in the string.

@yoiang yoiang changed the title Suggestion for new feature Consume similar payloads to Neopixel LED packets Aug 22, 2019
@yoiang
Copy link
Member

yoiang commented Aug 22, 2019

Hey @Just-another-pleb !
So our node supports any CSS valid color format as mentioned in the README, which means it does accept RGB values.

Adding support for a string of chained, indexed nodes feels like it adds complexity past a simple LED node's need. However if there is enough interest I could see an additional node that arranges, chains and indexes LED nodes how you're describing!

@Just-another-pleb
Copy link
Author

Thanks for the replies.

Ok, I agree with most of what you say.

That leads me to a "new" idea:

Rather than add all this extra dependency on the other library, make a new node.

That way if the people are happy with the LED node as is, all is good.

If they want to add brightness, they install the new node and put it just before the LED.

That way the "sacrifice" of all the extra stuff is only done if needed.
(the added size/burden of the code which mostly won't be used.)

@yoiang
Copy link
Member

yoiang commented Aug 27, 2019

Yea, I agree! I'll think it over more and see if something clear comes through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants