# Introduction This project describes a Raspberry Pi - time-lapse setup for the ARES beam line building project at DESY. **Installation**:
`git clone http://inetsrv.no-ip.org:3000/mwio/time-lapse_ARES_DESY.git` # ARES project setup status **Part I**:
![preview:](/Image-0753.jpg?raw=true "Part I") **Part II**:
![preview:](/IMG_20201019_121511__01.jpg?raw=true "Part II") **Raspberry Pi Setup**:
- Raspberry Pi ... Model - Raspberry Pi Gehäuse - Camera Module (standard version) - 16GB Samsung Pro microSDHC I Karte __Installation des Betriebsystems auf dem Raspberry Pi__:
Introduction: Installing operating system images on the 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 **Crontab Syntax**:
◦   ◦  ◦  ◦   ◦     auszuführender Befehl
┬ ┬ ┬ ┬ ┬
│ │ │ │ │
│ │ │ │ └──── Wochentag (0-7, Sonntag ist 0 oder 7)
│ │ │ └────── Monat (1-12)
│ │ └──────── Tag (1-31)
│ └────────── Stunde (0-23)
└──────────── Minute (0-59)
**1) Used code for the ARES-time-lapse-crontab - Playing audio Message**:
`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/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.