Main Content

Arduino takes picture from camera and upload it to Google Drive via Google Drive API. Login process is via OAuth 2.0.

How It Works
1. Login to Google Account via OAuth 2.0 for IoT devices to obtain access_token.

Login process is described in this project on Hackster.

2. When the button is pressed, Arduino gets picture from camera, and then upload to Google Drive using access_token via Google Drive API.

Google Drive API for uploading file is described in Google document.

How To
- Create Google Project from Google Developer Portal and obtain GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
- Replace GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in Arduino code
- Upload login.php file to PHPoC Shield. See instruction
- Compile and Upload Arduino code via Arduino IDE
- See ip_address of PHPoC shield on Serial Monitor
- Access Login Page on PHPoC Shield: http://ip_address/login.php and Login to Your Google Account
- Press Button to take Picture
- Check your Google Drive after two second, you will see the taken picture in your Drive.”

Link to article