-
-
Save KonradIT/8481271 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
pi@raspberrypi ~/public_html/gopro $ cat take_picture_and_send.sh | |
#!/bin/bash | |
## volume 100% | |
curl "http://10.5.5.9/camera/BS?t=goprohero&p=%02" | |
sleep 1 | |
## mode to photo | |
curl "http://10.5.5.9/camera/CM?t=goprohero&p=%01" | |
sleep 1 | |
## take picture | |
curl "http://10.5.5.9/bacpac/SH?t=goprohero&p=%01" | |
sleep 1 | |
## download picture from gopro | |
/home/pi/public_html/gopro/download_latest_picture.sh && \ | |
sleep 1 && \ | |
## delete picture \ | |
curl "http://10.5.5.9/camera/DL?t=goprohero" | |
pi@raspberrypi ~/public_html/gopro $ cat download_latest_picture.sh | |
#!/bin/bash | |
a=`/usr/bin/curl -s "http://10.5.5.9:8080/DCIM/" | grep GOPRO | tail -1` | |
b=`expr ${a:23:8}` | |
c=`/usr/bin/curl -s "http://10.5.5.9:8080/DCIM/$b/" | grep JPG | tail -1` | |
d=`expr ${c:23:12}` | |
/usr/bin/curl -s "http://10.5.5.9:8080/DCIM/$b/$d" -o /tmp/$d | |
--- crontab --- | |
*/10 * * * * /home/pi/public_html/gopro/take_picture_and_send.sh > /dev/null 2>&1 | |
pi@raspberrypi ~/public_html/gopro $ cat send_pictures_to_ezc.sh | |
#!/bin/bash | |
/usr/bin/scp /tmp/*.JPG ezhong@ezc:/data/time_lapse/ssid1/ && rm -rf /tmp/*.JPG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment