README.md, further optimization and added shell script files for the crontab: take_photo.sh and audio_message.sh.
This commit is contained in:
29
README.md
29
README.md
@@ -26,6 +26,19 @@ __Installation des Betriebsystems auf dem Raspberry Pi__:<br>
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
# Cronjob
|
||||||
<a href="https://www.stetic.com/developer/cronjob-linux-tutorial-und-crontab-syntax/ " target="_blank">Introduction: Crontab Syntax und Tutorial in Linux</a>
|
<a href="https://www.stetic.com/developer/cronjob-linux-tutorial-und-crontab-syntax/ " target="_blank">Introduction: Crontab Syntax und Tutorial in Linux</a>
|
||||||
@@ -41,12 +54,20 @@ __Installation des Betriebsystems auf dem Raspberry Pi__:<br>
|
|||||||
└──────────── Minute (0-59)<br>
|
└──────────── Minute (0-59)<br>
|
||||||
|
|
||||||
**1) Used code for the ARES-time-lapse-crontab - Playing audio Message**:<br>
|
**1) Used code for the ARES-time-lapse-crontab - Playing audio Message**:<br>
|
||||||
`59 14 * * * /time-lapse_ARES_DESY/src/ARES_FotoText.wav` <br>
|
`59 14 * * * /time-lapse_ARES_DESY/src/audio_message.sh` <br>
|
||||||
Jeden Tag um 14:59 Uhr wird das Audiofile "ARES_FotoText.wav" abgespielt.
|
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**:<br>
|
**2) Used code for the ARES-time-lapse-crontab - Taking a photo**:<br>
|
||||||
`* 15 * * * /time-lapse_ARES_DESY/src/ARES_...sh` <br>
|
`* 15 * * * /time-lapse_ARES_DESY/src/take_photo.sh` <br>
|
||||||
Jeden Tag um 15:00 Uhr, wird die Datei "ARES_...sh" abgespielt, um ein Foto zu schießen.
|
Jeden Tag um 15:00 Uhr, wird die Datei "take_photo.sh" abgespielt, um ein Foto zu schießen.
|
||||||
|
|
||||||
|
|
||||||
|
**List active Crontab(s)** <br>
|
||||||
|
`~ crontab -l`
|
||||||
|
|
||||||
|
**Remove active Crontab(s)** <br>
|
||||||
|
`~ crontab -r`
|
||||||
|
|
||||||
|
|
||||||
# ToDo's
|
# ToDo's
|
||||||
- [X] Add the right Cronjob file and description.
|
- [X] Add the right Cronjob file and description.
|
||||||
|
|||||||
BIN
src/ARES_Foto.pdf
Normal file
BIN
src/ARES_Foto.pdf
Normal file
Binary file not shown.
3
src/audio_message.sh
Executable file
3
src/audio_message.sh
Executable file
@@ -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
|
||||||
|
|
||||||
2
src/take_photo.sh
Executable file
2
src/take_photo.sh
Executable file
@@ -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
|
||||||
Reference in New Issue
Block a user