Electronic Googly Eye Glasses - Hackster.io

2022-08-13 02:12:57 By : Mr. rendong dai

Add the following snippet to your HTML:

Build your own googly eye glasses or just attach the eyes to anything you want. Everything is better with googly eyes.

Read up about this project on

Build your own googly eye glasses or just attach the eyes to anything you want. Everything is better with googly eyes.

Googly eyes never fail to make people smile and laugh where ever they unexpectedly show up. I first ordered some circular displays for another project but while testing them out I thought it would be fun to hook up an accelerometer and create a googly eye.

After initial positive feedback, I decided to create googly eyes glasses so that I can wear googly eyes everywhere. This project teaches you how to build your own googly eye glasses.

Like many open source projects, this one owes many thanks to others people who built the foundation upon which I started. Tod Kurt for explaining how to have multiple displays in CircuitPython, the Ruiz brothers for the 3D printable LED glasses model that I modified and Phil Burgess who had done a googly eye Arduino project that I found in the middle of my own work, that helped me understand the math involved to make the edge collisions look so much better. Links to these projects are found later.

The Things section lists all the parts used but there are a couple small notes about them:

The glasses print consist of three parts: the frame, the left arm that holds the Feather and the right arm that holds the accelerometer. All the parts will print flat, not needing support. The arms connect to the frame with two M2.5 screws and nuts.

Next step is to wire the electronics together and attach them to the glasses. It is easiest to do the soldering before you attach the electronics to the glasses.

Important: Be careful where you want the wires to go. In my build I had the TFT displays feed the wires through the frame to the Feather. This meant that once I soldered the wires to the TFTs I had to feed the wire through the hole in the frame before soldering the other wire ends to the Feather.

All the connections between electronic parts are shown on the wiring diagram.

All the components connect to the glasses with M2 screws and nuts. The parts attach to the outer side of the glasses.

The last step is to load the code on the glasses and modify any configuration settings that you want to adjust. All the code is available on GitHub.

The glasses run on CircuitPython and were tested on version 7.3 and 8.0-alpha. To be able to display the eyes on two displays at once you will need to custom built version of CircuitPython that enables two displays. I have included a pre-built two display CircuitPython version for the Adafruit Feather RP2040 in the Googly Eye repository. Tod Kurt's blog post has more details on how to enable two displays if you want to build CircuitPython with two displays for another board.

Two external libraries are required for the code to run. The LSM9DS1 library is found in the main CircuitPython library bundle. The GC9A01 display driver is found in the CircuitPython community bundle. Both these libraries must be placed in the lib directory on your CircuitPython drive.

There are two python files in the Googly Eye repository needed to run the glasses. The primary file code.py and googlyeye.py that defines a class that runs a single eye.

The code displays two independently acting googly eyes with default settings that were chosen only for what I thought looked good.

At the start of code.py there are four settings that are may be modified to allow you to change the behavior of the eyes:

So you have amazed your friends with your fun and exciting googly eyes, and if you have not tried them on a Teams meeting for work yet what are you waiting for? But what's next.

Just like their plastic counterparts the electronic googly eyes have a million uses. Some ideas I've tossed about are:

If you do build the glasses or any ideas based on them please let me know or tag me when you (hopefully) share your creation. I would love to see.