Skip to content

Instantly share code, notes, and snippets.

@ma2shita
Last active November 7, 2019 12:58
Show Gist options
  • Select an option

  • Save ma2shita/e0545e6c1b51ac32026f1ae197226512 to your computer and use it in GitHub Desktop.

Select an option

Save ma2shita/e0545e6c1b51ac32026f1ae197226512 to your computer and use it in GitHub Desktop.
Let's try IoT Prototyping / Fixed point camera with RPi (camera_shooting / implementation)
#!/bin/bash
echo "$0"
read LINE
if [ "$LINE" = "shooting!" ]; then
echo "Taking a Photo!"
fswebcam -q --device /dev/video0 - \
| curl -X POST -H 'Content-Type: image/jpeg' --data-binary '@-' --connect-timeout 15 harvest-files.soracom.io
fi
echo "$0 END"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment