Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 20 lines (16 sloc) 493 Bytes
#!/bin/bash
set -e
SNAPSHOT_PATH=/home/pi/snapshots
mkdir -p "$SNAPSHOT_PATH"
DATE=$(date +"%Y-%m-%d_%H%M")
SNAPSHOT_NAME="$DATE.jpg"
NOW_SNAPSHOT_PATH="$SNAPSHOT_PATH/$SNAPSHOT_NAME"
CURRENT_SNAPSHOT_PATH="$SNAPSHOT_PATH/current.jpg"
echo "taking snapshot $NOW_SNAPSHOT_PATH"
raspistill \
-o "$NOW_SNAPSHOT_PATH"
# --width 2048 \
# --height 1536 \
echo "snapshot saved $NOW_SNAPSHOT_PATH"
cp "$NOW_SNAPSHOT_PATH" "$CURRENT_SNAPSHOT_PATH"
echo "saving current.jpg $NOW_SNAPSHOT_PATH"
You can’t perform that action at this time.