1
0
Fork 0

Update 'README.md'

This commit is contained in:
Kevin Matz 2019-11-04 10:50:38 -05:00
parent 907336204b
commit c81e14bb52
1 changed files with 23 additions and 16 deletions

View File

@ -5,50 +5,57 @@ Use buttons connected to a Rasberry Pi GPIO to trigger Hog 4 comment macros.
* Install Raspbian [the usual way.](https://www.raspberrypi.org/documentation/installation/installing-images/README.md) * Install Raspbian [the usual way.](https://www.raspberrypi.org/documentation/installation/installing-images/README.md)
* Enable the ssh server. On a mac: * Enable the ssh server. On a mac:
``` ```sh
touch /Volumes/boot/ssh touch /Volumes/boot/ssh
``` ```
* Eject the SD card and boot the Raspberry Pi. * Eject the SD card and boot the Raspberry Pi.
* Use SSH to log into the Pi: * Use SSH to log into the Pi:
``` ```sh
ssh pi@raspberrypi ssh pi@raspberrypi
``` ```
* Use raspi-config to; * Use raspi-config to;
```sh
sudo raspi-config
```
* set locale * set locale
* set timezone * set timezone
* enable ssh server * enable ssh server
* enlarge the file-system to fill the SD card * enlarge the file-system to fill the SD card
* reboot * reboot
```
sudo raspi-config
```
* Update the Apt and install aptitude * Update the Apt and install aptitude
``` ```sh
sudo apt-get update sudo apt-get update
sudo apt-get install aptitude sudo apt-get install aptitude
``` ```
* Use aptitude to upgrade the Pi. * Use aptitude to upgrade the Pi.
``` ```sh
sudo aptitude upgrade sudo aptitude upgrade
``` ```
* Reboot the Pi. * Reboot the Pi.
``` ```sh
sudo shutdown -r now sudo shutdown -r now
``` ```
* Logging back into the Pi, install sane set of software packages. * Logging back into the Pi, install sane set of software packages.
``` ```sh
sudo aptitude install git python3-pip python3-gpiozero sudo aptitude install git python3-pip python3-gpiozero
sudo pip3 install gpiozero antlr4-python3-runtime python-osc sudo pip3 install gpiozero antlr4-python3-runtime python-osc
``` ```
## Installing ## Installing
``` ```sh
cd /home/pi cd /home/pi
git clone --recurse-submodules https://git.company235.com/kevin/onsetswitch.git git clone --recurse-submodules https://git.company235.com/kevin/onsetswitch.git
cd onsetswitch cd onsetswitch
``` ```
RaspberryRaspberry
## Configuring ## Configuring
@ -58,30 +65,30 @@ Connect one side of the button to ground, the other to a GPIO pin.
![](https://gpiozero.readthedocs.io/en/stable/_images/button_bb.svg) ![](https://gpiozero.readthedocs.io/en/stable/_images/button_bb.svg)
Configure the buttons: Configure the buttons:
``` ```sh
nano buttons.cfg nano buttons.cfg
``` ```
### Output ### Output
Configure the Hog4 OSC server: Configure the Hog4 OSC server:
``` ```sh
nano server.cfg nano server.cfg
``` ```
## Enabling on Boot ## Enabling on Boot
Link the onsetswitch service file to systemd: Link the onsetswitch service file to systemd:
``` ```sh
sudo ln -s buttons.service /lib/systemd/system/buttons.service sudo ln -s buttons.service /lib/systemd/system/buttons.service
``` ```
Enable the service at startup: Enable the service at startup:
``` ```sh
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable buttons.service sudo systemctl enable buttons.service
``` ```
Reboot the Raspberry Pi: Reboot the Raspberry Pi:
``` ```sh
sudo reboot sudo reboot
``` ```