Not mission critical, but I hope someone’s reading this cuz I wanna solve it in the next hour. There’s a bouncing ball effects over here:
that I’m using in a holiday tie (pics later). But because of the way I wired it up, I need to reverse the bounce and I can’t for the life of me figure out that math. I want it to effectively bounce down, instead of up as if gravity were reversed and starting at the top of the strip instead of the bottom. Unfortunately, just reversing the gravity variable doesnt do the trick.
Please help! I got a party to look totally tacky at!
Nevermind. I kept crankin on it and it wasn’t anywhere near as complicated as I had thought. Just changed the positioning line to subtract from the total LEDs
Position[i] = NUM_LEDS - (round( Height[i] * (NUM_LEDS - 1) / StartHeight));
Try playing with gravity and start height. Changing gravity to a positive number and start height to number of LEDs should work
@Dushyant_Ahuja I thought that at first too, but that wasn’t the case. I haven’t quite wrapped my head around how the bounce is calculated, but as I posted above, modifying the position setter to just subtract the number from the total number of LEDs worked perfectly.