Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sjdiego/go-luxafor
Script to manage Luxafor LED devices
https://github.com/sjdiego/go-luxafor
Last synced: 3 days ago
JSON representation
Script to manage Luxafor LED devices
- Host: GitHub
- URL: https://github.com/sjdiego/go-luxafor
- Owner: sjdiego
- License: mit
- Created: 2021-02-17T11:39:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-02-17T11:39:23.000Z (over 3 years ago)
- Last Synced: 2023-04-28T21:40:29.172Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# goluxafor
A little script to manage colors of Luxafor LED devices## How to use
You must compile for the platform where is going to be executed.The available parameters are:
* `-d (1-n)` device where command will be performed
* `-r (0-255)` intensity of red color
* `-g (0-255)` intensity of green color
* `-b (0-255)` intensity of blue colorTo turn on a color you have to know the RGB codes. For example, if you want to turn on the leds of your device with
a green color, you could use the following command:
* `./luxafor -g 255`Maybe you have multiple Luxafor LED devices. You can select which device will receive the commando using `-d` parameter.
For example, you can send the command to another device with this command:
* `./luxafor -d 4 -r 255 -b 255`If you want to turn off the device, execute the command without color parameters:
* `./luxafor`## Real use example
I have a Raspberry Pi 3B+. I can use it combined with a bash script to monitor RPi CPU temperature and switch colors when
it's too high. The script was compiled for arm5 and copied to `/usr/bin/`to be able to execute simply using `luxafor` command.Then a bash script is executed as cron job each minute to check the temperature and send the proper command to the device:
```
#!/bin/bashMIN_TEMP=52
MAX_TEMP=56cpu=$(