Created
November 25, 2013 23:33
-
-
Save luanlmd/7650827 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TIMESTAMP=$(date +"%Y-%m-%d_%T") | |
FILE="/home/pi/timelapse/$TIMESTAMP.jpg" | |
EX="beach" | |
ISO="100" | |
HOUR=$(date +"%k") | |
if [ $HOUR -lt 6 ] || [ $HOUR -gt 18 ]; | |
then | |
EX="night" | |
ISO="400" | |
fi | |
echo "Taking photo $FILE" | |
raspistill -o $FILE -q 100 -ISO $ISO -awb horizon -ex $EX -rot 180 | |
echo "Syncing" | |
/usr/bin/rsync --progress -avhz --update /home/pi/timelapse/ [email protected]:/home/user --ignore-errors | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment