Go daemon for Pimoroni Scroll pHat
With this daemon, you can scroll strings on your Pimoroni Scroll pHat through command line or Telegram messages.
Install
$ go get -d github.com/meinside/scroll-daemon
$ go get github.com/meinside/scroll-daemon/cmd/scroll-cli
and build daemon:
$ cd $GOPATH/src/github.com/meinside/scroll-daemon
$ go build
Configuration
Config file
$ cd $GOPATH/src/github.com/meinside/scroll-daemon
$ cp config.json.sample config.json
$ vi config.json
and edit values to yours:
{
"api_token": "0123456789:abcdefghijklmnopqrstuvwyz-x-0a1b2c3d4e",
"local_port": 59991,
"available_ids": [
"telegram_id_1",
"telegram_id_2",
"telegram_id_3"
],
"phat_brightness": 5,
"phat_scroll_delay": 75,
"phat_rotate_180degrees": false,
"telegram_monitor_interval": 1,
"is_verbose": false
}
systemd
$ sudo cp systemd/scroll-daemon.service /lib/systemd/system/
$ sudo vi /lib/systemd/system/scroll-daemon.service
and edit User, Group, WorkingDirectory and ExecStart values.
It will launch automatically on boot with:
$ sudo systemctl enable scroll-daemon.service
and will start with:
$ sudo systemctl start scroll-daemon.service
Send messages/commands through Telegram
Send messages/commands through command line
$ scroll-cli -t
$ scroll-cli -i
$ scroll-cli "show me the money $$$"
$ scroll-cli `uname -a`
License
MIT