Mailbox camera code for Raspberry Pi By Braedan Kennedy
Raspberry Pi Zero W
Raspberry Pi Camera V.2
cv2 (3.4 or newer)
numpy
picamera
google-api-python-client
google-auth
google-auth-httplib2
oauth2client
httplib2
slackclient
RPi.GPIO
Enable Raspberry Pi camera serial interface through raspi-config
Go to https://api.slack.com and create a new slackbot. Create a bot user and copy the "Bot User OAuth Access Token" to a new file named "token" in the "slack" directory. Create a new slack channel named "mailbot" in the workspace the bot has been configured in.
Go to https://console.developers.google.com/apis and start a new project. Click Create credentials - API key. Save the .json as credentials.json in the "gdrive" directory.
Go to google drive and create a new folder. Edit its permissions so anyone on the internet can view it. In sharing, find the share link and copy it. In "drivePublisher.py", in the upload method, replace "folderID" with the link.
Example run script:
#!/bin/bash
screen -d -m -S mailbox bash -c 'cd /home/pi/mailbot && python3 main.py'
3D printed case credit to Superrei Download the file on Thingiverse: https://www.thingiverse.com/thing:1595429
Thanks to Adrian at PyImageSearch for the helpful tutorial: https://www.pyimagesearch.com/2018/02/26/face-detection-with-opencv-and-deep-learning/