-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmissioncontrol.sh
executable file
·60 lines (51 loc) · 2.34 KB
/
missioncontrol.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
backupdate=$(date +%Y%m%d)
backuptime=$(date +%H%M%S)
#Create all directories of not already existend
mkdir -p /home/pi/Sensors/
mkdir -p /home/pi/Audio/
mkdir -p /home/pi/Video/
mkdir -p /home/pi/Photo/
echo "Disabling HDMI..."
#This command disables the HDMI output for power saving
#To enable HDMI output again use: tvservice -p
sudo /opt/vc/bin/tvservice -o
echo "HDMI disabled..."
echo "Starting Sensor Measuring..."
#This Python script starts the Adafruit Ultimate GPS Measuring and Logging, as well as the BMP085 and
#It uses the Adfruit Python Script located at /home/pi/Adafriut-Raspberry-Pi-Python-Code/Adafruit_BMP085/Adafruit_BMP085.py in order to control the BMP085 sensor
#It also writes the measured data to the following MySQL tables:
#hab_BMP085
#hab_DEVICES
#hab_ERROR
#hab_GPS
#hab_HIH6130
#hab_MINIMU9V2
#hab_RASPI
#It uses the Python Scrip located at /home/pi/missioncontrol/GPS_Controller.py in order to control the GPS module
#sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock & #enable the GPS socket
#echo "GPS enabled..."
#echo "Starting signal output..."
#sudo python /home/pi/missioncontrol/signals.py &
#echo "Starting sensor measurement..."
#sudo python /home/pi/missioncontrol/sensors.py &
#echo "Starting Audio Recording..."
#This command starts the USB Microphone Sound Recording
#It also writes the recorded audio to the following file: /home/pi/Audio/audio_<date><time>.wav
#sudo arecord -D plughw:1,0 -q -f cd /home/pi/Audio/audio_$backupdate$backuptime.wav &
echo "Starting Video Recording..."
#This command starts the RaspiCam Video Recording
#It also writes the recorded video to the following file: /home/pi/Video/video_<date><time>.avi
sudo /opt/vc/bin/raspivid -w 1920 -h 1080 -v -t 0 -ex auto -mm matrix -fps 30 -o /home/pi/Video/video_$backupdate$backuptime.avi
echo "Starting Photo Recording..."
#This command starts the RapsiCam Photo Recording
#It also writes the recorded photos to the following file: /home/pi/Photo/photo_<date>_<time>.jpg
#for ((i=0; ;i++))
#do
# backuptime=$(date +%H%M%S)
# filename=”$backupdate$backuptime”
# sudo /opt/vc/bin/raspistill -w 512 -h 288 -v -ex auto -mm matrix -o /home/pi/Photo/photo_small_$backupdate$backuptime.jpg
# sleep 15
# sudo /opt/vc/bin/raspistill -w 2592 -h 1944 -v -ex auto -mm matrix -o /home/pi/Photo/photo_large_$backupdate$backuptime.jpg
# sleep 15
#done