Capture photos using Raspberry Pi Camera and upload to dropbox. Delete local file once photos are uploaded.
Note: These instructions are based on running on the Raspberry Pi 3 with Raspbian Jessie Lite OS
Capture with Pi camera
- Insert Pi camera
- Enable camera in raspi-config
- Make sure you have the following installed:
- python (sudo apt-get install python3)
- picamera (sudo apt-get install python3-picamera)
- Specify photo format
Dropbox Upload
- Sign up for Dropbox account at dropbox.com
- Navigate to Dropbox Developers
- Select 'Create your app'
- Select the following:
- Dropbox API
- App folder or Full Dropbox (Depends on purpose)
- Enter a name for your app
- Create app
- Generate code and copy to clipboard
- Make sure you have the following installed:
- python (sudo apt-get install python3)
- pip (sudo apt-get install python3-pip)
- dropbox for python (sudo pip install dropbox)
- Use a text editor e.g. nano, to edit the file and fill in:
- TOKEN - the dropbox app code you generated
- uploadPath - folder on dropbox you want photo uploaded to (Not required)
Run
$ python3 picamCaptureDropboxUpload.py
Raspberry Pi 3 with:
- Raspberry Pi Camera v2.1