Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julusian/rpi-ws281x-artnet
https://github.com/julusian/rpi-ws281x-artnet
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/julusian/rpi-ws281x-artnet
- Owner: Julusian
- License: mit
- Created: 2021-12-18T17:15:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-22T18:23:39.000Z (about 3 years ago)
- Last Synced: 2024-10-31T10:12:43.495Z (2 months ago)
- Language: Rust
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Hardware setup
This has only been tested on a 3B. More recent models may work, but may need code changes to use the correct GPIO pins.
Note: It is compiled for arm7, this can likely be changed without issueConnect up the data line and ground of the lights to the pi for PWM mode as descibed [here](https://github.com/jgarff/rpi_ws281x#gpio-usage).
The application is expecting GPIO12, so pin 32 should be used (pin 30 is conveniently a GND).### Compiling
This assumes you are on linux, to compile from other platforms the steps will need adjusting
* Install Rust from [rustup.rs](https://rustup.rs/)
* Add the arm7 target `rustup target add armv7-unknown-linux-gnueabihf`
* Install required libs `sudo apt install libclang-dev gcc-arm-linux-gnueabihf`
* Build it `cargo build --release`
* The resulting binary `./target/armv7-unknown-linux-gnueabihf/release/pi-ws281x-artnet` can be copied to the pi### Installing
Copy the binary to the raspberry pi
* Create the file `/etc/systemd/system/ws281x.service`
```
[Unit]
Description=WS281x Artnet
After=network-online.target
Wants=network-online.target[Service]
Type=simple
User=root
WorkingDirectory=/home/pi
ExecStart=/home/pi/pi-ws281x-artnet
Restart=on-failure
KillSignal=SIGINT
TimeoutStopSec=60[Install]
WantedBy=multi-user.target
```
* `sudo systemctl daemon-reload`
* `sudo systemctl enable ws281x.service`
* `sudo systemctl start ws281x.service`