Has anybody here worked on something similar to this?

Just a quick update… I have most of the waterdrop code converted over to FastLED and a more traditional C++ style. Down to a few niggling compile errors that I need to work out before I can finish rounding out a couple of functions and testing. More news as it develops.

Thanx for the update :slight_smile:

Okay, got it compiling, but it’s not actually behaving much like it should. I think I probably have some messed up variable references. I’ll keep banging on it.

Arg. I’m so rusty on pointer/reference manipulation.

What I’m trying to do is pass a reference to FastLED’s leds array from the .ino code into the constructor of my Water_Torture class and copy it to a local private variable. Then I should be able to manipulate indexes of the local ‘leds’ inside the class. But I don’t think I have it right. Can anybody give me a quick example of doing that?

Update: I have it sorta-kinda partway working. Though I need to look more closely at Danny’s add_clipped_to() function, because I think my quicky replacement isn’t working the same way, and it’s having side effects because of the weird way he uses the blue color component to trigger the transition from ‘swelling’ to ‘falling’.

I should be able to post some code tomorrow (Thursday).

Looking forward to it :slight_smile:

Got it working! I have some other things to take care of at the moment, but at some point today (might be 30 minutes, might be 8 hours) I’ll slap the code up on Github and post a video.

One limitation in my port is that I’ve hardcoded it to use the color Blue. But maybe before I upload it I’ll make a small mod to let you set and retain a custom color.

And maybe I’ll refactor Danny’s overloaded use of the blue color component as a counter to track when a drop changes from ‘swelling’ to ‘falling’ state.

Sweet! Looking forward to it. Setting a custom color would be great if possible.

Posted! https://plus.google.com/+DougalCampbell/posts/8gzoSn2xZKH

and in 2D:

@Thomas_Runge Ha! That’s great