Raspberry pi 3 - notes

Raspberry for Efield (CS110) sensor

mac address: b8:27:eb:f5:7f:2b
machine name: EfieldRb

username: pi
password: RadonHyyt

ssh pi@194.117.25.207
password: RadonHyyt

pi@EfieldRb:~ $ cd Desktop/CS110/ pi@EfieldRb:~/Desktop/CS110 $ ls
scriptDaily.sh scriptGetCS110.sh

In [ ]:
# crontab -e

*/15 * * * * sh /home/pi/Desktop/CS110/scriptGetCS110.sh >> /home/pi/Desktop/CS110/CS110.log 2>&1
01 00 * * * sh /home/pi/Desktop/CS110/scriptDaily.sh >> /home/pi/Desktop/CS110/daily.log 2>&1
0 */3 * * * bash /home/pi/observationSync.sh
In [ ]:
## scriptGetCS110.sh ##

#!/bin/sh
until /usr/local/bin/pycr1000 update serial:/dev/ttyUSB0:38400 'Tab60sec' /home/pi/data/Tab60sec.csv --timeout 1;do
        echo "continue"
done
In [ ]:
## scriptDaily.sh

dat=$(date +"%Y-%m-%d")
head --lines=1 /home/pi/data/Table60sec.csv > /home/pi/data/temp1.tmp
head --lines=-1 /home/pi/data/Table60sec.csv > /home/pi/data/Table60sec_$dat.csv
tail --lines=1 /home/pi/data/Table60sec.csv >> /home/pi/data/temp1.tmp
rm /home/pi/data/Table60sec.csv && mv /home/pi/data/temp1.tmp /home/pi/data/Table60sec.csv

Raspberry for gamma sensor

mac address: b8:27:eb:16:05:90
machine name: GammaRb

username: pi
password: RadonHyyt

ssh pi@194.117.25.207
password: RadonHyyt

In [ ]:
# crontab -e

*/15 * * * * sh /home/pi/Desktop/CR800/scriptGetCR800.sh >> /home/pi/Desktop/CR800/CR800.log 2>&1
01 00 * * * sh /home/pi/Desktop/CR800/scriptDaily.sh >> /home/pi/Desktop/CR800/daily.log 2>&1
In [ ]:
## scriptGetCR800.sh ##

#!/bin/sh

/usr/local/bin/pycr1000 update serial:/dev/ttyUSB0:9600 'Table1' /home/pi/data/Table1.csv --timeout 1
In [ ]:
## scriptDaily.sh ##

dat=$(date +"%Y-%m-%d")

head --lines=1 /home/pi/data/Table1.csv > /home/pi/data/temp1.tmp
head --lines=-1 /home/pi/data/Table1.csv > /home/pi/data/Table1_$dat.csv
tail --lines=1 /home/pi/data/Table1.csv >> /home/pi/data/temp1.tmp
rm /home/pi/data/Table1.csv && mv /home/pi/data/temp1.tmp /home/pi/data/Table1.csv