Magic Cauldron effect
Jeff Haas
Posts: 421
in Propeller 1
Make Magazine always has interesting things in their email newsletter. The other day, there was a link to this Magic Cauldron project:
https://community.makezine.com/share/ianmckay/magic-cauldron-6da6b1
I thought the idea was interesting, and the way he put it in a cauldron with glass beads to diffuse the glow was good, but after I saw the second video, I figured the lighting effect could be a lot better. It looks too much like someone flipped a switch to pick the selected color, instead of a magical, mystical glow. So I spent some time on it:
- Wrote my version for the Propeller instead of the Arduino
- When activated, swirling colors fade in, then fade down
- The selected color turns on and then fades out
I'm not quite happy with the transition from the swirling rainbow to the selected color, but I figure I'd share it here, someone may find a use for it. You'll need an Adafruit NeoPixel ring to see the effect.
https://community.makezine.com/share/ianmckay/magic-cauldron-6da6b1
I thought the idea was interesting, and the way he put it in a cauldron with glass beads to diffuse the glow was good, but after I saw the second video, I figured the lighting effect could be a lot better. It looks too much like someone flipped a switch to pick the selected color, instead of a magical, mystical glow. So I spent some time on it:
- Wrote my version for the Propeller instead of the Arduino
- When activated, swirling colors fade in, then fade down
- The selected color turns on and then fades out
I'm not quite happy with the transition from the swirling rainbow to the selected color, but I figure I'd share it here, someone may find a use for it. You'll need an Adafruit NeoPixel ring to see the effect.
Comments
You don't need RealRandom to seed Heater's PRNG object -- there's enough jitter in the start-up of the cnt register that I now do it like this:
I needed a color morph effect for a WS2812 project and did it like this:
This can be useful for smooth color-to-color transitions.
I should have some time this weekend to try these out.
The revised seed method for PRNG is great, thanks.
It took a bit for me to figure out a good way to use the morph method. Here's an abbreviated version of what I've got so far:
This is a really nice fade effect. I think I see how to apply this to the wheel effects, it seems there's an additional level of nesting required, but that's as far as I've got right now.
Jeff
When you're fading a pure color up or down, you can simplify. To go from blue to black, you could also do this:
If you change << 0 to << 1 you'll fade the green channel, << 2 for the red channel. My acting teacher used to say that as there are many roads that lead to Rome, there are many ways to approach a problem. Here's another road for your programming travels!
It like to use waitcnt in these cases as it takes care of the loop overhead and ensures the fade timing is constant.
For the fade code, there's something I'm missing. Maybe it's too late Sunday night, but...
This works for me:
This does not: Setting strip.fill(0, 15, (fade << 2)) results in Blue flashing three times.
Thanks again.