So I have the X and Y value readings form an accelerometer/gyro breakout board working, (mpu-6050) and the 9X9 matrix I posted about last night, now what i’d like to do is implement something like @Stefan_Petrick 's Noise Smear III ( https://plus.google.com/115124694226931502095/posts/YbkcF1YdU4v ) I want a single pixel to move around like the red and blue ones from 00:00 to 00:15 according to the X and Y values from the sensor and leave a small fading tail if possible. I’m not asking anyone to do the work for me, but if someone could point me in a good direction I would really appreciate it.
My recent thinking about how to leave a trail (behind anything really), is not to clear the whole leds[] array to black at the start of every frame, but instead just dim it down, e.g.
fadeToBlackBy( leds, NUM_LEDS, 20);
Then just draw the new current pixels brightly on top of whatever’s there. The net effect is a nice soft fading trail.
This fading technique is used a couple of different ways in the “DemoReel100” example code in the FastLED 3.1 branch.
The “flying arround something” can be achieved by adding sine waves. Take the X value and add a sinewave which produces values from -amplitude to +amplitude. Result: a swinging point along a line. Use a second sinewave with the same frequency and with a phase offset of 90 degrees. Add this to Y. Result: a circular path arround X/Y. Detune the frequencies for fancy effects. Check out http://en.wikipedia.org/wiki/Lissajous_curve for inspiration. I recommend to use FastLEDs sin8, it´s amazing fast. It gives you values between 0 and 255. Scale that down to your desired range. Subtract the half of the range from the result. Now you have the sinwave swinging between -0.5range and 0.5range. Does that make any sense to you?