diff --git a/README.md b/README.md index 9db4aa7..4ab649f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,19 @@ __Installation des Betriebsystems auf dem Raspberry Pi__:
![preview:](/2020-10-17_18-282.png?raw=true "Raspberry Pi and Camera Module connected.") +# Playing audio Message - shell script +For this job we will use **aplay**. is a command-line soundfile recorder for the ALSA soundcard driver. It supports several file formats and multiple soundcards with multiple devices. Make a new file called "audio_message.sh" for example. This file will contain the following lines: +``` +aplay /home/pi/Documents/ARES_TimeLapse/ARES_FotoText.wav +``` + +# Taking a Photo - shell script +For this job we will use **raspistill**. raspistill is a command line tool for capturing still photographs with the camera module. Make a new file called "take_photo.sh" for example. This file will contain the following lines: + +``` +#!/bin/sh +raspistill -o /home/pi/Documents/ARES_TimeLapse/pic-`date +"%Y.%m.%d-%H:%M:%S"`.jpg -l /home/pi/Documents/Beamline-timeruffer/latest.jpg +``` # Cronjob Introduction: Crontab Syntax und Tutorial in Linux @@ -41,12 +54,20 @@ __Installation des Betriebsystems auf dem Raspberry Pi__:
└──────────── Minute (0-59)
**1) Used code for the ARES-time-lapse-crontab - Playing audio Message**:
-`59 14 * * * /time-lapse_ARES_DESY/src/ARES_FotoText.wav`
-Jeden Tag um 14:59 Uhr wird das Audiofile "ARES_FotoText.wav" abgespielt. +`59 14 * * * /time-lapse_ARES_DESY/src/audio_message.sh`
+Jeden Tag um 14:59 Uhr wird das Audiofile "audio_message.sh" abgespielt. **2) Used code for the ARES-time-lapse-crontab - Taking a photo**:
-`* 15 * * * /time-lapse_ARES_DESY/src/ARES_...sh`
-Jeden Tag um 15:00 Uhr, wird die Datei "ARES_...sh" abgespielt, um ein Foto zu schießen. +`* 15 * * * /time-lapse_ARES_DESY/src/take_photo.sh`
+Jeden Tag um 15:00 Uhr, wird die Datei "take_photo.sh" abgespielt, um ein Foto zu schießen. + + +**List active Crontab(s)**
+`~ crontab -l` + +**Remove active Crontab(s)**
+`~ crontab -r` + # ToDo's - [X] Add the right Cronjob file and description. diff --git a/src/ARES_Foto.pdf b/src/ARES_Foto.pdf new file mode 100644 index 0000000..73573b5 Binary files /dev/null and b/src/ARES_Foto.pdf differ diff --git a/src/audio_message.sh b/src/audio_message.sh new file mode 100755 index 0000000..dd52d42 --- /dev/null +++ b/src/audio_message.sh @@ -0,0 +1,3 @@ +#espeak --stdout "In five seconds will a photo been taken. Please step out of the cameras area. Photo will be taken in. . . 5. 4. 3. 2. 1. SHOT." | aplay +aplay /home/pi/Documents/ARES_TimeLapse/ARES_FotoText.wav + diff --git a/src/take_photo.sh b/src/take_photo.sh new file mode 100755 index 0000000..ea2f103 --- /dev/null +++ b/src/take_photo.sh @@ -0,0 +1,2 @@ +#!/bin/sh +raspistill -o /home/pi/Documents/ARES_TimeLapse/pic-`date +"%Y.%m.%d-%H:%M:%S"`.jpg -l /home/pi/Documents/Beamline-timeruffer/latest.jpg