From 70f5f14211a6ae66945703be6735eb320060fadf Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 12 Mar 2023 17:58:07 +0700 Subject: [PATCH] add more pi setup info --- aqi_monitor_py/README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/aqi_monitor_py/README.md b/aqi_monitor_py/README.md index 83896b9..4b8a0c9 100644 --- a/aqi_monitor_py/README.md +++ b/aqi_monitor_py/README.md @@ -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 +```