Plasma lights animations


#1

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

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);