Main Content


Digital rain animation gif with glow squeezed into a raspberry pi pico and pimoroni pico-display or how to actually use all Flash memory on your raspberry pi pico

I wanted to have the matrix ‘digital rain’ effect on a small display. Instead of using a library, I wanted to use a ‘nicely rendered’ GIF file for animation. Due to the display resolution of 135x240 it resulted in a GIF with a large file size of 8MB. Because I was too lazy to implement an existing file compression I first just shortened and modified the animation manually (with GIMP you can modify each frame of a gif).

Unfortunately, the file was still too large with roughly 4MB and then I decided to implement a primitive compression using just 16 custom colors (mainly different green tones and black). Then I used a python file to convert the gif to a .h file of what color to use from the palette for each pixel and each frame. Like that I needed just 4bits per pixel and I could squeeze all 127 frames into the 2MB Flash the Raspberry Pi pico has on board.”

Link to article