Plasma lights animations

Our shiny new Plasma arcade button lighting system (https://shop.pimoroni.com/products/picade-plasma-kit-illuminated-arcade-buttons) uses png images to store lighting patterns.

This means you can share them right here in the forums.

Each image must be a 24bit PNG file, and should be:

  • 4 pixels wide if you want it repeated to all buttons
  • 24 pixels wide for 6 buttons
  • 40 pixels wide for 10 buttons

The height of the image represents its duration and animation frames. Each pixel of height is 1/60th of a second (this is wall-timed and fixed no matter what framerate you set the Plasma daemon to).

A 1-pixel high image is basically static, so you can use this to set static button colours for various emulators and switch to them using runcommand_onstart.sh as documented here- https://retropie.org.uk/docs/Runcommand/#runcommand-onstart-and-runcommand-onend-scripts. IE, your runcommand-onstart.sh script might simply include plasmactl $1 to pass the current system name straight to plasma. You might also want to follow it with plasmactl fps 5 if you’re using a static image to save resources for the emulator.

Your runcommand-onend.sh might then be plasmactl default and plasmactl fps 30

To install a lighting pattern, download it directly to your Pi by "wget"ing the image URL, or copy it over SSH or otherwise, and then run sudo plasmactl --install filename.png

Once installed, switch with plasmactl filename (without the .png extension).

Everything else is up to your imagination. To kick things off here are all the files (some of them utterly terrible) that I produced while testing/developing the system:

(you may need to right click and get the URL of these images. If they are lightboxed you should open the lightbox version first to get the full-sized image)

Links to larger files

nature slownoise

pastel fire ocean random-teal movie-poster pink-pulse rainbow-cycle-transparent rainbow-cycle hyperwave bluenwhite Untitled-6 rednwhite trippy rainbow-spin rainbow-alternate-long rainbow-alternate example-flash plasma-rainbow

The JS I used to extract the larger file links from the forum

var post_index = 1;
var output = "";
$('#post_' + post_index.toString() + ' .cooked img').each(function(idx, ele){
    ele = $(ele);
    var title = ele.attr('alt');
    var src = ele.parents('.lightbox').length == 1 ? ele.parents('.lightbox').attr('href') : ele.attr('src');
    output += " * " + title + " - " + src + "\n";
})
console.log(output);
2 Likes

How do we set the Picade/PI to lauch a specific PNG when booting with plasmactl?

I’ve created an image to make the buttons a static color and would like that to be the image it runs at boot. At the moment when I reboot it goes back to the rainbow image (buttons changing colors).

Thank you!!

I found it!

You set the PNG you want to run at boot in the /etc/plasma/ dir to the name default.png

Thanks!!

For info, there is a glitch in the github README :

  • 36 pixels - individual LED values for 6 buttons

should be :

  • 24 pixels - individual LED values for 6 buttons

I created this PNG for splitting the buttons when a game is started :
custom

with :
/usr/bin/plasmactl custom
/usr/bin/plasmactl fps 1