The Snake Eyes Bonnet is a Raspberry Pi accessory for driving two small OLED or TFT LCD displays, and also provides four analog inputs for sensors.
It's fantastic for making cosplay masks, props, spooky sculptures for Halloween, animatronics, robots...anything where you want to add a pair of animated eyes!
It’s a follow-on of sorts to another project: Electronic Animated Eyes Using Teensy 3.2. The Teensy 3.2 is a very capable microcontroller, and the code for that project squeezed every bit of space and performance from it. I had been experimenting with the Raspberry Pi as an alternative…though still somewhat experimental, why not make that work available to others?
The Raspberry Pi offers some potential benefits:
- Hardware-accelerated 3D graphics (OpenGL), including antialiasing.
- A faster CPU, ample RAM and dual SPI buses could yield faster frame rates.
- Standard graphics formats like JPEG, PNG and SVG can be decoded on the fly; no preprocessing step.
- The eye rendering code is written in a high-level language — Python — making it easier to customize.
And some possible downsides to the Pi:
- Raspberry Pi takes time to boot an operating system off an SD card, whereas Teensy is instant-on with all code in flash memory, . The Pi also requires an explicit shutoff procedure (usually).
- The Raspberry Pi is not as suitable for wearable applications…it’s larger, uses more power, and the SD card makes it less rugged.
This is a somewhat technical and not-inexpensive project. Please read through everything first before commiting. If it seems daunting, the original Teensy Eyes are more “Arduino-like” to build and customize, or other guides like Animating Multiple LED Backpacks provide a more approachable introduction to code and electronics with less of an investment.
A Raspberry Pi 2 or greater is highly recommended. The code will run on a Pi Zero or other single-core Raspberry Pi boards, but performance lags quite a bit. Pi 4 works now, which was previously incompatible.