3/8/2018 - 2:41 PM

timelapse - google drive python

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 -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

# create a camera script inside /your/drive/directory
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/