I wanted to make something that puts some network traffic through an Ethernet switch. This gives me something to test more complicated switch configuration, and something to make pretty graphs of in grafana.

But first I had to make the thing. I had already build the cluster soon after the pi4 was released. It has a pimoroni unicorn HD hat with 16x16 RGB leds on the main node. I did put a new version of raspbian on them, because the update went from oldstable to oldoldstable.

My idea was to have a hit on a certain coordinate and color make a pixel light it up and then have it decay over time. I got that working without the network part.

Then I bolted flask onto the Python script, and hit a snag. Apparently you need some extra bits to periodically run a function. I didn’t quite feel like figuring that out for now. My solution is to just have it decay a step every time a request is made.

The last step was to make a script that makes a request for random pixels. Give it a color and it will put pixels on the screen as fast as it can.


You must log in to comment.

in reply to @mifune's post: