Skip to content

Instantly share code, notes, and snippets.

@alptugan
Last active March 28, 2018 12:20
Show Gist options
  • Save alptugan/68019b9ce7032f37c0b3d5698871ad9f to your computer and use it in GitHub Desktop.
Save alptugan/68019b9ce7032f37c0b3d5698871ad9f to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get install imagemagick -y
# for manual
# drive man for manual
drive man
# list remote path files
drive list
# upload content to drive
drive push
# download content to local machine
drive pull
# install gdrive
cat /proc/cpuinfo | grep "model name"
mkdir /your/drive/directory
# install gdrive
https://github.com/odeke-em/drive/releases/download/v0.3.9/drive_armv7 -O /usr/local/bin/drive
# Make the binary executable.
sudo chmod +x /usr/local/bin/drive
# Initialize drive
drive init /your/drive/directory
# asks for serial, then goto link and copy key
4/AACaVk-t451nA6Wtpzh6dfawS3MH0asLXhlYpnKnf5gGV1gWeAy2A5k
# create a camera script inside /your/drive/directory
#!/bin/bash
DATE=$(date +"%Y-%m-%d_%H%M%S")
cd /home/pi/gdrive
raspistill -vf -hf -o $DATE.jpg
echo "image saved as $DATE"
sudo drive push -no-prompt -ignore-conflict -destination sabanci $DATE.jpg
echo "image pushed to filika drive"
sudo rm $DATE.jpg
echo "$DATE.jpg image deleted"
# shutdown rpi after 5 min
sudo shutdown -h +5
# Kntrl +o && Kntrl+x
# then goto raspi-config
sudo raspi-config
# goto network settings and enable "wait for wifi connection to be started"
# crontab
5 * * * * /home/aspera/my_script.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment