Skip to content

Instantly share code, notes, and snippets.

@syaffers
Last active May 1, 2019 20:26
Show Gist options
  • Save syaffers/ac9598adddb60ba38357fd21d5c30891 to your computer and use it in GitHub Desktop.
Save syaffers/ac9598adddb60ba38357fd21d5c30891 to your computer and use it in GitHub Desktop.
Headless AIY Vision Kit Setup from Raspbian Lite

Headless AIY Vision Kit Setup from Raspbian Lite

I faced some errors when trying to setup the AIY Vision kit using the Google AIY hacking docs. Here is my quick documentation of to allow for a smoother setup process from a blank Raspbian Lite image.

Pre-setup

If you have not already have an SD card with the Raspbian Lite image, do that now. Balena's Etcher is a good way to do this on most OSes. Now with the image burned, enable SSH headlessly by making an empty file called ssh in the boot directory on the SD card. If your Raspberry Pi has Wi-Fi capabilities, you may also want to create a wpa_supplicant.conf to enable wireless networking when the Raspberry Pi boots up for the first time.

Once you gain access to the Raspberry Pi via SSH, you may want to configure the Raspberry Pi by running sudo raspi-config to set a new password, correct time/date, keyboard layout, and minimize memory use on the GPU since we are not looking to have a graphical UI. Most importantly we need to enable the Raspberry PI camera interfacing option so the Python libraries can access the camera inputs.

Installing some important packages

Before installing any of these packages, make sure that the most up-to-date base packages are installed by running sudo apt update && sudo apt upgrade. Since the AIY library uses Pillow and compiles it from scratch, we needs to install libjpeg-dev from the APT repository.

Joy detection demo packages

We need a few packages to have the joy detection demo work properly. One of them is the Ubuntu free font packages as the joy detection code use one of the fonts for drawing text on images. The code also uses some commands form the avahi-utils package so that should be installed.

Commands:

$ sudo apt update && sudo apt upgrade
$ sudo apt install libjpeg-dev
$ sudo apt install avahi-utils fonts-freefont-ttf

Filesystem setup

The Raspbian Lite image does not create any user folders for the pi user and so the joy detection app will not be able to save any captured images. This is a simple fix: create a Pictures directory in the /home/pi folder.

Commands:

$ mkdir /home/pi/Pictures

Done

At this point you can follow the HACKING.md documentation in the AIY GitHub repository and everything should install normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment