Skip to content

Commit

Permalink
Swap GPIO pins to Plasma header defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Mar 9, 2020
1 parent d987cae commit 43e88df
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions README.md
Expand Up @@ -69,8 +69,6 @@ sudo pip2 install plasmalights

### Using Plasma Daemon

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:14:15` to `-o SERIAL:/dev/ttyACM0`. If you're using Unicorn HAT or pHAT you should use `-o WS281X:WS2812:18:0`.

To install the Plasma daemon you should clone this repository, navigate to the "daemon" directory and run the installer:

```
Expand All @@ -79,6 +77,14 @@ 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:
Expand Down
2 changes: 1 addition & 1 deletion daemon/etc/systemd/system/plasma.service
Expand Up @@ -5,7 +5,7 @@ After=local-fs.target

[Service]
# Change -o to SERIAL:/dev/ttyACM0 for Plasma via Picade Player X
ExecStart=/usr/bin/plasma -d -o GPIO:14:15
ExecStart=/usr/bin/plasma -d -o GPIO:15:14
Restart=on-failure
Type=forking
PIDFile=/var/run/plasma.pid
Expand Down
3 changes: 2 additions & 1 deletion daemon/usr/bin/plasma
Expand Up @@ -146,7 +146,8 @@ def options():
help="set plasma LED update framerate")
parser.add_option("-l", "--lights", action="store", dest="lights", type="int", default=LIGHTS,
help="set number of lights in your plasma chain")
parser.add_option("-o", "--device", default="GPIO:14:15")
parser.add_option("-o", "--device", default="GPIO:15:14",
help="set output device, default is GPIO, BCM15 = Data, BCM14 = Clock")
return parser.parse_args()[0]


Expand Down

0 comments on commit 43e88df

Please sign in to comment.