From f186b7a498dfbcd230a457667f5b7498a4ff7ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sun, 24 Jul 2022 08:01:16 +0000 Subject: [PATCH] Added software install guide --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de3acaf..0552156 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # strawberry-pi-greenhouse Strawberry Pi Greenhouse is a little project that i made in my holidays. It's a software that sends sensor data (temperature, water level) to a Homeassistants instance and can receive commands from this HA instace to control a relay. -#Installation + +#Software Installation To activate the sensors you have to add these lines to you /boot/config.txt file on your raspberry pi micro sd card. You can change the pin numbers if you want. ``` @@ -15,4 +16,25 @@ dtoverlay=i2c-gpio,bus=2,i2c_gpio_delay_us=1,i2c_gpio_sda=2,i2c_gpio_scl=3 dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_auot=4 ``` -Also you have to enable the i2c devices in the raspi-config menu. If you dont know how to do it you can just google it. \ No newline at end of file +Also you have to enable the i2c devices in the raspi-config menu. If you dont know how to do it you can just google it. + +Now we need some packages that are needed to run the script. You can install them with this command: + +``` +sudo apt install python3-pip screen -y +``` + +Now you can put the following command in a crontab to run the strawberry pi script in the background when the raspberry pi starts: +``` +crontab -e +@reboot bash /path/to/repo/strawberry-pi-greenhouse/start.sh +``` +You can also create a service/deamon or something like that if thats your thing instead of crontab. + +The last thing you have to do befor you reboot is to enable i2c devices in the raspi-config. +1. execute this command `sudo raspi-config` +2. go to `Interface Options` +3. select `I2C` +4. select `Yes` + +Now you can reboot your pi with `sudo reboot` \ No newline at end of file