Has anybody worked on an FastLED simulator?

Has anybody worked on an FastLED simulator? I imagine a little GUI where you “plug” strips into an graphical MCU, then lay out the geometry and connections of the strips and run the code to preview the displays?

It’s on the list of things to do, but haven’t had a chance to do it yet.

I bought a Tim for this purpose. Not software. But I attached a teensy to it, and you don’t need a desk etc, just laptop, tv, code and see.

http://wyolum.com/the-intelligent-matrix-tim/

Hi guys, is it something like that what you saerched for? http://codepen.io/dougalcampbell/pen/fnjFu
i found it today, but i actually don’t know how to use it (but i will) i’m very new in programming, but since a year i work hard, because i use the ws2811 chipset in my installations.i do things like this led doorframe http://youtu.be/7CDDdvxf4NA
but most code is not written by myself until the moment. but i’m a good user. i learn most in your fastled community and on adafruits learning system. Thank you for sharing!!!

There’s an openpixelcontrol simulator but that’s not nearly the same thing

I’m working on a C+ swapin mock / display sort of thing. I just picked it up after a few… uhm… a while.

A first attempt produced a png of the led vector with the y axis being time. It worked okay, not great, not even good, but okay.

My plan of record is to stub out the fast* code like FastSPI_LED.show(); to write out an IR that is later displayed via a rube Goldberg machine and webgl rather than doing a cycle simulation of an Arduino. Currently It’s not that great or functional. The first generation will be square boxes rather than any attempt at
proper light field handling.

Now that I’m thing about it, doing some sort of povray thing might work out well…

What sort of geometries are you interested in?

I have a FastLED stub project for MS Visual Studio that I can add my Arduino FastLED modules too. Then I can build them and see a simulation of the LED display in a window. I have 3 defines that control width, height & layout. It’s how I was able to test my Matrix, Text & Sprite code on all manner of LED layouts without lifting a soldering iron :wink:
I have buttons that allow me to call Setup & Loop.

Thanks for all the great advice!

Hi! I wrote the browser simulator mentioned above (@matthi_DELight pointed to the codepen, but the main page is here: http://dougalcampbell.github.io/LEDStrip/).

I was actually about to contact you anyways to ask if you mind me including versions of your animations (BouncingBalls, Lightning, etc). I’ve already translated BouncingBalls to JavaScript. But you didn’t put any licensing info on your code, so I wanted to ask permission before I added it to my github repo.

I had already been toying with the idea of adding functions to my ledstrip.js code to give it an API similar to Adafruit’s NeoPixel library. And I was just starting to think about doing something similar for FastLED.

I’ve also thought about using processing.js to make it easier to write modules that would be easier to port back and forth between browser testing and Arduino code. But I’ll have to do more research on that to see how well it would work out. In my Copious Free Time™, of course…

Hi Dougal. You are welcome to use my code however you like. Thanks for working on this.

Thank you! I will update my Github repo soon!

Okay, changes are live now. You can now select the Bouncing Balls demo:
http://dougalcampbell.github.io/LEDStrip/

I’ll start converting the other demos soon-ish.

I finally got around to adding Lightning and TwinkleSparkle. Let me know what you think!

Due the async nature of JavaScript, there’s not a simple procedural way to emulate delay() calls. So I had to do a major refactoring of the Lightning code to use a state machine approach.

I need to do some other refactoring one day. The way I have things now, I use a lot of ‘this.something’ references in the animation code. I could use a module pattern more like the main ledstrip.js code to reduce that. Also, I should probably create shims for common functions in the Adafruit NeoPixel and FastLED libraries.

But that stuff will have to wait for another day.

Wow, great work Dougal! That looks awesome.

I have a few suggestions. Please have a look at the FastLED simulations.

Visit the wokwi home page for more information

Bonus colection fo FastLED simulations!

1 Like