Is there anyone willing to help me modify a fastLed sketch such that the animation will run in the opposite direction? It’s a rather complicated one. I posted the code https://gist.github.com/perigalacticon/6c0d4a92329833bd1b768a009f6a4fba
Do you just want the wave to travel in the opposite direction?
Ack, you’re mixing libraries.
Yes I put it together based on EspNeoPixelBus because you get glitches in the fire animation, as I understand it due to ESP8266 WIFI system interrupts, unless you use neopixelBus. I also want to upload OTA to my Wemos D1 Mini so I put all of this together. It runs really well actually. I just want it to go down instead of up in the installation and the installation is not easy to change!
Try changing line 36 from:
CRGB leds[NUM_LEDS];
To:
CRGBArray<NUM_LEDS> leds; //Using CRGBSet
And add this right after line 125:
leds = leds(NUM_LEDS-1,0); //reverse order of pixel data
Thanks. Interestingly now approximately the bottom half of the strand is going down but the top half is going up.
Crud, I’m afraid I don’t fully understand how CRGBArrays work then.
@Stephen_Kramer - Try changing line 129:
from:
for (int i = 0; i < NUM_LEDS; i++)
to:
for( int i = NUM_LEDS-1; i >=0; i–)
You might also need to change line 190 or comment it out.
Ken you want me do make your changes not including Marc’s right? If I include Marc’s it makes the waves move in towards the center instead of away from the center. I’ll try some other iterations.
Ken that worked, just with the changes you said including commenting line 190, thanks! I’ll post a vid of it later, a flowing Minecraft Lava Pillar).
Here you go! There are other decorations scattered around but they either have mostly dead batteries or are turned off right now. The pillars look great though, they are either playing the fire or lava palettes. The pillars are printed paper graphics from a local print shop of the Minecraft Lava texture, you can kind of see it in the close up (3rd) video. The prints are taped to wrought iron porch pillars and a (shower curtain extender to make a 4th corner) and there are 3 strands of 91 leds in each pillar. They are driven from level shifters and a Wemos D1 Mini MCU. It has worked perfectly without glitches after running each strand from a separate level shifter channel, and using the neopixelBus library. Didn’t quite get it running in time for Halloween but it will look great next year. Thanks for your help!
https://drive.google.com/open?id=0B-jN2Adg-YnudV9CQzlaM3BRdG8
Incidentally can you recommend which numbers to vary in order to change the speed of the animation (make the lava fall faster)?
@Stephen_Kramer - I am glad you were able to solve your problem. The front of your house looks awesome! Really great and very creative lavapillar effect. I love what you did over your front door with your version of Adafruit’s spooky eyes. You did a great job capturing your animations on video, too.
Would you please be willing to share your code for your version of the spooky eyes animation?
As per speeding up the animation, I see from your code that you have already done the obvious steps in lines 40, 121 and 139 of your originally posted sketch. I would suggest that you try changing the various beatsin88 lines that are in the colorwave function (lines 146 to 194 of your originally posted sketch). This is where I would start. Please remember as per the FastLED DOCs:
“uint16_t beatsin88(accum88 beats_per_minute_88, uint16_t lowest = 0,uint16_t highest = 65535, uint32_t timebase = 0, uint16_t phase_offset = 0 )
beatsin88 generates a 16-bit sine wave at a given BPM, that oscillates within a given range.
For this function, BPM MUST BE SPECIFIED as a Q8.8 fixed-point value; e.g. 120BPM must be specified as 120*256 = 30720. If you just want to specify “120”, use beatsin16 or beatsin8.
Definition at line 888 of file lib8tion.h.”
I would start changing the BPM for some of the beatsin88 lines and see what happens. Also, changing the lower and upper limit ranges in the beatsin88 lines might speed things up, too. Finally, I would start with any of the beatsin88 lines which deal directly with MS values.
@Stephen_Kramer Your lava pillar is hot. Great effect.
The blinking eyes effect is based on this Tweaking4All sketch:
Here is the version I was playing:
@Stephen_Kramer - Thank you for sharing your code. I like it a lot and I will set up a WS2811 string or WS2812B strip with running it next Halloween.