Skip to content

Instantly share code, notes, and snippets.

@kumekay
Last active July 25, 2016 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumekay/9ae6495e3b9cc7d46157f02c4fbac71c to your computer and use it in GitHub Desktop.
Save kumekay/9ae6495e3b9cc7d46157f02c4fbac71c to your computer and use it in GitHub Desktop.
Web camera on Intel Edison with uploads to s3
photo_timestamp=$(date +%Y-%m-%d_%H%M)
fswebcam -r 1280x720 --jpeg 100 -D 3 -S 13 "${photo_timestamp}.jpg"
aws s3 cp "$photo_timestamp.jpg" "s3://$s3_bucket" && \
aws s3 cp "$photo_timestamp.jpg" "s3://$s3_bucket/latest.jpg" --acl public-read && \
rm "$photo_timestamp.jpg"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment