Quick sketch I've been working on, playing with various features of TinyScreen+ and exploring performance potential of the product. This sketch draws firework-like particles on the TinyScreen+, utilizing some fast (approximate) sin and cos libraries from FastLED, a fast memcpy function from Daniel Vik, and double full screen buffers, transmitted to the screen via DMA buffer transfer in TinyScreen.cpp. Trails are created by dimming previous pixels in the buffer. Some comments in the sketch should guide you to play around and change parameters or create new animations. Code readability sacrificed for performance, but the basic principle of the particle motion is:
x=cos(angle) * velocity * time
y=sin(angle) * velocity * time + (gravity * time
2)/2
Video here:
https://www.youtube.com/watch?v=yx1q0dLf7ogCode here:
https://github.com/egonbeermat/fireworksFastLED library here:
https://github.com/FastLED/FastLED/releasesBeermat