#!/bin/bash echo "AM2302" python3 am2302.py > /home/pi/am2302.txt sleep 5 temperatur=1 luftfeuchte=0 datei="/home/pi/am2302.txt" echo ANFANG >> am2302.log while read line do line=$(echo $line | tr . ,) echo Line $line >> am2302.log echo 1 $temperatur >> am2302.log if [[ $temperatur != 1 ]]; then luftfeuchte=$line echo Luftfeuchte $luftfeuchte >> am2302.log else temperatur=$line echo Temperatur $temperatur >>am2302.log fi done < $datei echo "DS18S20" readtemp=0 erdtemp=0 readtemp=`cat /sys/bus/w1/devices//w1_slave` sleep 5 erdtemp=`echo "scale=1; "\`echo ${readtemp##*=}\`" / 1000" | bc` FileName=$(date +"%Y%m%d_%H%M").jpg echo "ADS1115" sleep 5 python3 ads1115.py > /home/pi/ads1115.txt sleep 10 erdfeuchte=0 datei="/home/pi/ads1115.txt" echo ANFANG > ads1115.log while read line do line=$(echo $line | tr . ,) if [[ $line > 0 ]]; then erdfeuchte=$line echo Erdfeuchte $erdfeuchte >> ads1115.log echo Line $line >> ads1115.log fi done < $datei echo "home pi" cd /home/pi rm raspistill.jpg rm tmp.jpg rm image.jpg rm image1.jpg rm image2.jpg rm image3.jpg # raspistill -awb flash -co 10 -sa 30 -v -o raspistill.jpg -w 1440 -h 1080 # raspistill -awb off -awbg 1.5,0.5 -co 10 -sa 30 -br -100 -v -o raspistill.jpg -w 1440 -h 1080 echo "raspistill" raspistill -awb auto -v -o raspistill.jpg -w 1440 -h 1080 convert -pointsize 40 -fill blue -draw "text 960,40 '$(date +"%d.%m.%Y %T CET") '" raspistill.jpg tmp.jpg convert -pointsize 40 -fill blue -draw "text 50,40 'SpassAmHobby.de'" tmp.jpg image1.jpg convert -pointsize 50 -fill yellow -draw "text 420,40 'Luft: $temperatur°C $luftfeuchte%'" image1.jpg image2.jpg convert -pointsize 50 -fill red -draw "text 420, 1070 'Erde: $erdtemp°C $erdfeuchte'" image2.jpg image3.jpg cp image3.jpg /home/pi/image.jpg echo "ftp" HOST= Port=22 USER= # This is the FTP user. expect -c " set timeout 600 spawn sftp $USER@$HOST expect \"assword\" send \"\r\" send \"yes\" expect \"sftp>\" send \"cd /\r\" expect \"sftp>\" send \"mput image.jpg\r\" expect \"sftp>\" send \"exit\r\" interact " sleep 2