Code for cheap, easy, and low energy robot eyes.
The goal of this project was to make animated eyes for a robot costume that:
- Is relatively cheap.
- Can be powered off a phone charger.
- Can be iterated intermittently in my free time.
- Does not require an sensor equipment like cameras, accelerometers, etc.
- Could be replicated by others with little to no experience with soldering or electronics.
This project was written for the Adafruit Feather RP2040 SCORPIO, since its circuitpython compatibility make it very plug-and play.
To control the direction and expression of the eyes, a Adafruit Mini I2C Gamepad connected to the scorpio's 4-pin JST connector per Adafruit's STEMMA QT standard. Again, this makes the set up relatively plug-and-play.
Any 8x8 array of WS2812B individually addressible LEDs, which Adafruit calls "neopixels", should do. You need one per eye.
Any portable USB phone battery will fit the bill.
Solder either the wires or the JST connector of one eye to D13, the USB power pin, and ground. Then daisy chain the second eye from the first eye. FInally, connect the controller to the SCORPIO's STEMMA QT port.
Flash circuitpython onto the SCORPIO. After that it's just a matter of putting code.py and its dependencies onto the SCORPIO.
Not all LED arrays are wired in the same orientation. Edit the orientation and isRight arguments until the eyes are in the right direction.


