add more pi setup info

This commit is contained in:
simon 2023-03-12 17:58:07 +07:00
parent 7bbd4a5789
commit 70f5f14211
Signed by: simon
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 16 additions and 2 deletions

View File

@ -1,13 +1,27 @@
# Python Sensor Application
Updated script running on a RaspberryPi. Pure python implementation.
## Pi Setup
Enable *I2C1*: `sudo raspi-config` > *Interface Options* > *I2C*
## Install libraries
```
pip install -r requirements.txt
sudo apt install git python3-pip
```
```
pip3 install -r requirements.txt
```
Setup *config.json*
# Install service
```bash
sudo cp aqi_monitor_py/service/sensor.* /etc/systemd/system
sudo cp aqi_monitor/aqi_monitor_py/service/sensor.* /etc/systemd/system
sudo systemctl enable --now sensor.timer
```
Watch service logs for errors:
```
journalctl -u sensor -f
```