Package: plasmalights
Plasma: LED SequencingPlasma is an LED/Light sequencing suite written to harmonise a variety of LED strand/board types and interfaces into a standard API for write-once-run-anyway lighting code.Plasma also includes plasmad, a system daemon for sequencing light strips using PNG images to provide animation frames.Compatible ProductsPlasma was originally written to provide an easy way to sequence lights and swap out patterns for the Pimoroni Plasma kit.https://shop.pimoroni.com/products/picade-plasma-kit-illuminated-arcade-buttonshttps://shop.pimoroni.com/products/player-x-usb-games-controller-pcbhttps://shop.pimoroni.com/products/blinkthttps://shop.pimoroni.com/products/unicorn-hathttps://shop.pimoroni.com/products/unicorn-phatInstallingFull install (recommended):We've created an easy installation script that will install all pre-requisites and get your Plasma Arcade Button Lights
up and running with minimal efforts. To run it, fire up Terminal which you'll find in Menu -> Accessories -> Terminal
on your Raspberry Pi desktop, as illustrated below:In the new terminal window type the command exactly as it appears below (check for typos) and follow the on-screen instructions:curlhttps://get.pimoroni.com/plasma|bashIf you choose to download examples you'll find them in/home/pi/Pimoroni/plasma/.Manual install:sudopip3installplasmalightsUsing Plasma DaemonTo install the Plasma daemon you should clone this repository, navigate to the "daemon" directory and run the installer:git clone https://github.com/pimoroni/plasma
cd plasma/daemon
sudo ./installNote: If you're using Picade Player X you should edit daemon/etc/systemd/system/plasma.service and change the output device option from-o GPIO:15:14to-o SERIAL:/dev/ttyACM0. If you're using Unicorn HAT or pHAT you should use-o WS281X:WS2812:18:0.If you're using GPIO on a Picade HAT you can adjust the pins accordingly using-o GPIO:<data>:<clock>where data and clock are valid BCM pins. If you're using the old Plasma/Hack header you may need to swap from-o GPIO:15:14to-o GPIO:14:15depending on how your connections are wired.The Plasma daemon installer installs two programs onto your Raspberry Pi.plasmaitself and a tool calledplasmactlyou can use to install and switch lighting effects. Plasma runs as a service on your system.plasmactlcommands:plasmactl 255 0 0- Set Plasma lights to R, G, B colour. Red in this case.plasmactl <pattern>- Set Plasma lights to pattern imageplasmactl fps <fps>- Change plasma effect framerate (default is 30, lower FPS = less CPU)plasmactl --list- List all available patternssudo plasmactl --install <pattern>- Install a new pattern, where<pattern>is the filename of a 24bit PNG image fileDevelopment:If you want to contribute, or like living on the edge of your seat by having the latest code, you should clone this repository,cdto the library directory, and run:sudopython3setup.pyinstallDocumentation & SupportGuides and tutorials -https://learn.pimoroni.com/plasmaFunction reference -http://docs.pimoroni.com/plasma/Get help -http://forums.pimoroni.com/c/supportChangelog2.0.2Pass brightness values through plasma Matrix to underlying LED drivers2.0.1Newauto()can accept a config file path directly (for plasma daemon)NewMatrixandCorenow accept list and dict type sequences inset_sequenceNewMatrixconfig supports an "enabled" option for easy config switchingBugfixMatrixcatches KeyError when trying todelnon-required options2.0.0Port to Python >=3.7, drop Python 2.7 supportSignificant refactoring and restructuringConfig file support for configuring LED types/relationshipsWS382X supportChip-Select support for APA102PlasmaMatrix to combine multiple output devices1.0.0API refactor, use plasma.legacy for old APIUSB support for Picade Player X0.0.1Initial Release