(see Adafruit for full details)
The connectors on the bonnet and the OLED display boards have already been pre-soldered so you won't have to worry about that.
We will have a labeled Raspberry Pi or SD card with the Raspbian Lite operating system. This operating system has no Graphical User Interface (GUI). You can still connect an HDMI monitor up using the HDMI port. However, your interaction will be through the Command Line Interface (CLI). Basically a terminal window that takes up the entire screen. After you plug in the raspberry pi you will be presented with a prompt.
sudo raspi-config
cd
curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/pi-eyes.sh >pi-eyes.sh
sudo bash pi-eyes.sh
This script installs software for the Adafruit Snake Eyes Bonnet for Raspberry Pi. Steps include:
- Update package index files (apt-get update)
- Install Python libraries: numpy, pi3d, svg.path, python-dev, python-imaging
- Install Adafruit eye code and data in /boot
- Enable SPIO and SPI1 peripherals if needed
- Set HDMI resolution, disable overscan
Run time ~25 minutes. Reboot recquired.
Existing installation, if any, will be overwritten.
Continue? [y/n] y -just type in y for yes to continue
Select screen type:
1. OLED(128x128)
2. TFT(128x128)
3. IPS(240x240)
4. HDMI
Select 1-4: 1 -type in 1 for OLED
Install GPIO-halt utility? [y/n] n
Install ADC Support? [y/n] n
Install USB Ethernet gadget support? (Pi Zero) [y/n] n
Reboot NOW? [y/n] y
To customize the look of the eyes you can edit the code or the graphic files. The Adafruit website gives you some basic instructions on editing the graphic files. If you go to /boot/Pi_Eyes you will find several files and folders. The ones we are concerned with are:
Type:
cd /boot/Pi_Eyes
sudo nano eyes.py
Nano is a basic text editor. Use your arrow keys to navigate to line 81 of the code. Unfortunately Nano does not tell you what line number you're at so you just have to estimate and scroll through the code until you find the lines below.
Edit line 81 to read dom = parse("graphics/dragon-eye.svg")
You just have to change eye.svg
to dragon-eye.svg
Edit line 127 change iris.jpg to dragon-iris.jpg
Edit lin 129 change sclera.png to dragon-sclera.png
When you are finished hit CTRL-X to exit nano and type "y" when it asks you to save the file.