Skip to content

Instantly share code, notes, and snippets.

@fukayatsu
Last active August 29, 2015 14:10
Show Gist options
  • Save fukayatsu/0ee6c8f84443f625b444 to your computer and use it in GitHub Desktop.
Save fukayatsu/0ee6c8f84443f625b444 to your computer and use it in GitHub Desktop.
raspberry pi + camera + idobata
#!/bin/bash
# Usage
# 1. setup camera module and make it enabled
# 2. install ImageMagick
# 3. create generic webhook on idobata.io
# 4. add `0,30 10-23 * * * /home/pi/snap.sh` to crontab
raspistill -t 1 -o /home/pi/tmp/pic.jpg -w 200 -h 150 -q 80
convert -colorspace gray -sketch 0x20+135 /home/pi/tmp/pic.jpg /home/pi/tmp/pic_mod.jpg
curl --form image=@/home/pi/tmp/pic_mod.jpg https://idobata.io/hook/generic/xxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment