BrickPi Candy Sorter
6. Prepare the Raspberry Pi
Since we’re using Raspbian for Robots, there are only a few changes that need to be made to the software. All of them are specific to using Google Cloud Vision on the Raspberry Pi. We have a very thorough tutorial on how to get set up here. In short you’ll need to run the following in the command line:
sudo pip install --upgrade pipsudo apt-get install libjpeg8-devsudo pip install --upgrade google-api-python-clientsudo pip install --upgrade Pillowsudo apt-get install python-picamera, espeakFinally, you’ll need to upload your Google Application Credentials in JSON to the Raspberry Pi. Use an FTP program (such as FileZilla) or for Windows users Samba (
Next, we’ll turn on Super User and make our credentials available. In the command line, type the command “su”:
sudo You may need to run:
sudo suand you may need to enter in your password.
Next, we’ll make the JSON credentials available to Python. In the command line, run the following:
export GOOGLE_APPLICATION_CREDENTIALS=filename.jsonBe sure to substitute your JSON filename in this command with the name of the file you have on your Raspberry Pi.
Finally, we’ll download the code. Again, this should go into the home directory: