Code Monkey home page Code Monkey logo

plasma's Introduction

Plasma: LED Sequencing

Plasma 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.

Build Status Coverage Status PyPi Package Python Versions

Compatible Products

Plasma was originally written to provide an easy way to sequence lights and swap out patterns for the Pimoroni Plasma kit.

Installing

Full 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:

Finding the terminal

In the new terminal window type the command exactly as it appears below (check for typos) and follow the on-screen instructions:

curl https://get.pimoroni.com/plasma | bash

If you choose to download examples you'll find them in /home/pi/Pimoroni/plasma/.

Manual install:

sudo pip3 install plasmalights

Using Plasma Daemon

To 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 ./install

Note: 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:14 to -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:14 to -o GPIO:14:15 depending on how your connections are wired.


The Plasma daemon installer installs two programs onto your Raspberry Pi. plasma itself and a tool called plasmactl you can use to install and switch lighting effects. Plasma runs as a service on your system.

plasmactl commands:

  • plasmactl 255 0 0 - Set Plasma lights to R, G, B colour. Red in this case.
  • plasmactl <pattern> - Set Plasma lights to pattern image
  • plasmactl fps <fps> - Change plasma effect framerate (default is 30, lower FPS = less CPU)
  • plasmactl --list - List all available patterns
  • sudo plasmactl --install <pattern> - Install a new pattern, where <pattern> is the filename of a 24bit PNG image file

Development:

If you want to contribute, or like living on the edge of your seat by having the latest code, you should clone this repository, cd to the library directory, and run:

sudo python3 setup.py install

Documentation & Support

plasma's People

Contributors

gadgetoid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.