M5Camera + Motion sensor + LINE + GoogleDrive
Get Google Drive Token
Read moreEasy surveillance camera.
- Motion sensor detect something.
- Send image to LINE.
- Save the image to Google Drive.
- Prepare a project with Google Cloud Console.
- Enable Google Drive API.
- Add an OAuth 2.0 client with credentials.
- Make an authentication token by referring to https://developers.google.com/drive/api/v3/quickstart/nodejs only once.
- Get the request token from the authentication token with OAuth, and upload the file with the request token.
Get LINE Token
- Prepare a token with LINE Notify.
- Invite LINE Notify to the room you want to notify.
#define WIFI_SSID "XXXXXXXXX" // FIXME
#define WIFI_PASSWORD "XXXXXXXXX" // FIXME
#define LINE_TOKEN "XXXXXXXXX" // FIXME
#define LINE_MESSAGE "Detected!"
#define GOOGLE_CLIENT_ID "XXXXXXXXX.apps.googleusercontent.com" // FIXME
#define GOOGLE_SECRET "XXXXXXXXX" // FIXME
#define GOOGLE_REFRESH_TOKEN "XXXXXXXXX" // FIXME
#define PARENT_ID "XXXXXXXXX" // FIXME
https://github.com/masaki-takano/m5-capture/blob/master/capture.ino
Comments