Repository navigation
Conversation
This allows the code to link even if XY isn't filled in by the application, as long as the calling method is not used. The syntax is GNU-specific.
|
This is an awesome piece of work -- thank you for all of this! |
|
Thanks! Please do let me know what needs to be done, I'd love to get this out there. If anyone could try it out and let me know how it goes that would be useful - I tried to make it as self-contained and standard as I could, but I've only tested it on my own system (Ubuntu, gcc, Firefox). Really pleased you like it! |
|
Hi @kriegsman @focalintent - any thoughts about whether/how you can merge this? Guessing it's best to wait until after the holiday season now :-) |
|
Hi, excellent, Why not just to " stream or publish" via Wifi the leds[i] data , with a simple format , that could then be used on any client we may need , so that way we can achieve the purpose on many different ways . JS, P5js, processing , Java , etc . |
|
PNG is pretty universally easily rendered. I don't understand what you mean by "stream or publish via WiFi"? WebSockets have the advantage over plain sockets that they can easily be accessed from a browser, so no app needs to be installed on the client. |
|
I spent some time talking to mark about this - and I really want to keep the library focused on just directly driving LEDs on embedded platforms - and I would rather see things like this be projects that used FastLED rather than incorporated into FastLED itself. However, I know that's not easily doable right now - but I have a solution on my RGBW/16-bit branch - which is a NULL platform. Setting the platform to NULL means that you have to define your own CLEDController classes and instances, but would allow building/using all the color code and other management code of FastLED on platforms that we don't have hardware out for. I need to make some changes to it to bring back to this branch (the RGBW/16-bit branch has diverged enough that it won't be a straight copy over) - but once I do that, then you can then have a project that includes FastLED and builds on top of it. If I'm lucky, I'll be able to get this done before the end of the month - and I'll leave the pull request open until I've done it, just to make sure that it stays on my radar. |
|
Thanks, this sounds like a good solution - I realise it's a tricky balance to strike. Once you've added the NULL platform and I've refactored this WEB chipset into a new project built on top of it, would you mind linking to my project from the FastLED docs? As @kriegsman says, I think a lot of people will be happy to get their hands on this capability - I've certainly found it very useful in my own FastLED development. Obviously if you'd rather not that's fine too. |
|
Hi @focalintent - have you been able to make any progress with the NULL platform code? |
|
Dan's a bit under water just now, but he and I are both definitely in favor of adding the NULL platform; we'll get to that as soon as we can -- and then we'll definitely loop you in, and link to your web-based project. Thanks again for the contributions, of code and ideas! |
|
Thanks! |
|
Hi @focalintent - well done on getting 3.3 out! How would you like me to proceed with my PR - is there an easy way I can make this functionality available to people? I love the idea of making it a project that builds on top of FastLED. Thanks. |
|
@focalintent any update on this? |
|
Hi Keith @kw217, and thanks for following up. |
|
Oh no, I'm really sorry to hear that terrible news. Obviously take as much time as you need - and I'm sending my best wishes for all of you. Thanks. |
|
Thank you again, @kw217. I was just speaking with @uberjay (now a FastLED maintainer), and we're going to try to get this going, and merge it as best we can so people can use what you've built here. |
|
@kw217 At some point when things get updated, please share your project/some video of this in the FastLED Reddit group. There are most certainly others that will be interested in this. I was definitely interested when Dan had mentioned the idea of a NULL platform. Thank you. |
|
Sure - I'll see what I can do. Thanks! Presumably it's better if I wait until @uberjay has reviewed and we're en route to merging. |
|
I agree- let’s get the plan for merging this going and then it’ll be time for show and tell. I’ll loop back with @uberjay. Thanks, all. |
|
Hi @kriegsman @uberjay are you still interested in proceeding with this? Christmas is coming up and I'll be using this again soon :-) |
|
I'm on Yocto and getting the web and boost dependencies would have taken a few days. I updated #422 with the latest main branch if anyone comes across this and needs something quick. Should work on raspberry pi, etc: |
|
Hi @zackees - does this stub mode provide something like the "WEB" chipset this PR implements, which provides live LED output in your browser? If not, I'd like to add it - is this something you'd be interested in? I was hoping to get this in around 2020 but everything got put on hold with the sad news re @focalintent . |
|
You have 6 commits in this PR and I can't evaluate exactly what has changed. If you have a clean PR that is minimal and does not break anything then yes, I will merge it. |
|
Keeping this open. Please issue a new PR for this |
6fdf45c to
f18be6e
Compare
|
Will be in with the FastLED 4 release. You can preview it in the master branch now. Thanks to @shlomozippel for the prototype. |
|
Ah brilliant - thank you! Doing it in WASM is a much cleaner solution now (don't think it would have been practical in 2018). Thank you @zackees and @shlomozippel . Happy to prepare this PNG code for use if it's ever of interest, but I'm assuming it's irrelevant now. |
|
You are using our wasm build right? We now have native support. |

This PR adds support for the following to FastLED:
DUMMYchipset. This performs no output. It's useful for stubbing out code, or for testing a new platform.__unix__platform. This allows building the library for Linux, without requiring AVR or Arduino specials.WEBchipset. This provides live output to a browser. It's only supported on__unix__.I wanted to test my FastLED patterns without having to flash them to my Arduino or look at my LED array (which is fixed to the outside of my house and hence difficult to view from my workstation). So I added this new chipset, which runs a small webserver to which you can connect your browser. When you do so, the LEDs are displayed in the browser.
Use it like this:
and then connect your browser to http://localhost:9002/ to see the show. Multiple LED strings are supported - just specify an index in place of
0. Any port can be used -9002is just an example.Obviously to run typical Arduino code in this way you'll need to provide a
main()which callssetup()andloop(), and define any Arduino functions you use. If you guard these things and theaddLedsall above with#ifdef __unix__then the same code will work for Arduino and Linux. To build for Linux you will need to install libwebsocketpp-dev (https://github.com/zaphoyd/websocketpp), and link with-lboost_system -lpthread.Please let me know if there is anything I need to add to or change in this code to meet the FastLED project requirements.
Enjoy!
How it works: It runs a small combined web and websocket server. For web requests it serves a page with some Javascript, which then makes a websocket request back to the origin server. Each call to
showPixelsrenders an n x 1 PNG image of the LEDs and pushes it over the websocket to the browser, which displays it.