# Electronic Animated Eyes for ARM Microcontrollers

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/027/604/medium800thumb/light_big-eye-anim.jpg?1448320287)

Are you looking into&nbsp;these creepy animated eyes…or are they looking into&nbsp;you?

These peepers were inspired by&nbsp;a concept by David Boccabella (Marcwolf)&nbsp;on the [Stan Winston School of Character Arts forums](http://forums.stanwinstonschool.com). David is creating servo-driven animatronic eyes with&nbsp;a small OLED screen to simulate a dilating pupil.&nbsp;I'd chimed in with some suggestions and code to boost&nbsp;the refresh rate. Taking it to the next level here, we can&nbsp;render the _entire eye_…this makes the overall project simpler, as animatronics can be very fussy work (and the noise&nbsp;detracts from live&nbsp;performance).

**UPDATE: This project was originally designed with the [PJRC Teensy 3.1 or 3.2 microcontroller board](https://www.adafruit.com/product/2756) in mind. Since then, the code’s been expanded to support many Adafruit boards: most [Feather](https://www.adafruit.com/category/946) or ItsyBitsy boards with the “[M0](https://www.adafruit.com/product/3727)” or “[M4](https://www.adafruit.com/product/3800)” designation (_not_ AVR or 32u4 boards), plus&nbsp;[HalloWing M0](https://www.adafruit.com/product/3900), and [Circuit Playground Express](https://www.adafruit.com/product/3333) with the optional [TFT Gizmo](https://www.adafruit.com/product/4367). For the [HalloWing M4](https://www.adafruit.com/product/4300) and [MONSTER M4SK](https://www.adafruit.com/product/4343) boards, we have [a more evolved eye project](https://learn.adafruit.com/adafruit-monster-m4sk-eyes).**

**Most of the documentation and diagrams here proceed with the Teensy 3.2 in mind. With a pinout diagram for one of the above boards, it’s usually straightforward to adapt.**

![](https://cdn-learn.adafruit.com/assets/assets/000/027/605/medium800/light_dragoneyes.jpg?1441516383)

 **This is a “choose your own adventure” project.** There&nbsp;are&nbsp;many ways to build it…this guide is not really aiming toward any particular finished _thing._ It’s the start of a recipe, but where it goes is up to your imagination…

- Spooky&nbsp;eyes in the window for Halloween
- An amazing costume for Dragon\*Con
- A single eye worn in a pendant or a bracer, or in the headpiece of a staff
- World’s creepiest taxidermy

Read through to see what parts are involved for different configurations.

 **Parts from Adafruit:**

- **PJRC [Teensy 3.2 microcontroller](https://www.adafruit.com/product/2756)**&nbsp;(one board will control 1 or 2 eyes); Teensy 3.1 will also work. **(As noted above, many Adafruit M0 and M4 boards can also be made to work.)**
- Display(s) - **one per eye** : either **[1.5" OLED](https://www.adafruit.com/product/1431)**&nbsp;or **[1.44" TFT](https://www.adafruit.com/product/2088)**. OLED looks _amazing_&nbsp;but costs more. TFT is affordable but colors are less intense. Tradeoffs!

**Additional parts and tools:**

- Soldering iron and paraphernalia
- 28 gauge ribbon cable
- Optional: 1.5" Acrylic cabochons (half-spheres)
- Optional: 3D printer to make enclosures, held&nbsp;with #2-56 screws and nuts
- Optional: LiPoly Backpack and battery (500mAh for OLED, 150mAh for TFT)

**The following components&nbsp;are OPTIONAL. Our&nbsp;software&nbsp;can handle all of these effects autonomously, but you can optionally add any or all of these parts to enable manual control:**

- Analog joystick for movement
- Button(s) for eye blinks or winks
- Photocell makes pupils&nbsp;react to light

If using a PJRC Teensy board, this project _requires_ the Teensy 3.2 (or 3.1) microcontroller (or one of the aforementioned Adafruit boards). _Not_ the Teensy 2, 3.0, LC, nor any other Arduino-like board, period. **It relies on features unique to ARM microcontrollers.**

This project involves detailed&nbsp;soldering around costly parts; **read through before deciding if this guide is for you**. Newcomers to electronics might start&nbsp;with the [Animating Multiple LED Backpacks](../../../animating-multiple-led-backpacks)&nbsp;guide — it achieves a similar effect with easier, more affordable&nbsp;components!

- [Next Page](https://learn.adafruit.com/animated-electronic-eyes/3d-printing.md)

## Featured Products

### Teensy 3.2 + header

[Teensy 3.2 + header](https://www.adafruit.com/product/2756)
[Teensy](http://www.pjrc.com/teensy/index.html) 3.2&nbsp;is a small, breadboard-friendly development board designed by Paul Stoffregen and PJRC. Teensy 3.2&nbsp;brings a low-cost 32 bit ARM Cortex-M4 platform to hobbyists, students and engineers, using an adapted version of the...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2756)
[Related Guides to the Product](https://learn.adafruit.com/products/2756/guides)
### Teensy 3.1 + header

[Teensy 3.1 + header](https://www.adafruit.com/product/1625)
[Teensy](http://www.pjrc.com/teensy/index.html) 3.1 is a small, breadboard-friendly development board designed by Paul Stoffregen and PJRC. Teensy 3.1 brings a low-cost 32 bit ARM Cortex-M4 platform to hobbyists, students and engineers, using an adapted version of the Arduino IDE...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1625)
[Related Guides to the Product](https://learn.adafruit.com/products/1625/guides)
### OLED Breakout Board - 16-bit Color 1.5" w/microSD holder

[OLED Breakout Board - 16-bit Color 1.5" w/microSD holder](https://www.adafruit.com/product/1431)
We love our black and white monochrome displays but we also like to dabble with some color now and then. Our big 1.5" color OLED displays are perfect when you need a small display with vivid, high-contrast 16-bit color. The visible portion of the OLED measures 1.5" diagonal and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1431)
[Related Guides to the Product](https://learn.adafruit.com/products/1431/guides)
### Adafruit 1.44" Color TFT LCD Display with MicroSD Card breakout

[Adafruit 1.44" Color TFT LCD Display with MicroSD Card breakout](https://www.adafruit.com/product/2088)
This lovely little display breakout is the best way to add a small, colorful and bright display to any project. Since the display uses 4-wire SPI to communicate and has its own pixel-addressable frame buffer, it can be used with every kind of microcontroller. Even a very small one with low...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2088)
[Related Guides to the Product](https://learn.adafruit.com/products/2088/guides)
### Photo cell (CdS photoresistor)

[Photo cell (CdS photoresistor)](https://www.adafruit.com/product/161)
CdS cells are little light sensors. As the squiggly face is exposed to more light, the resistance goes down. When it's light, the resistance is about ~1KΩ, when dark it goes up to ~10KΩ.

To use, connect one side of the photocell (either one, it's symmetric) to power...

In Stock
[Buy Now](https://www.adafruit.com/product/161)
[Related Guides to the Product](https://learn.adafruit.com/products/161/guides)
### Analog 2-axis Thumb Joystick with Select Button + Breakout Board

[Analog 2-axis Thumb Joystick with Select Button + Breakout Board](https://www.adafruit.com/product/512)
This mini-kit makes it easy to mount a PSP/Xbox-like thumb joystick to your project. The thumbstick is an analog joystick - more accurate and sensitive than just 'directional' joysticks - with a 'press in to select' button. Since it's analog, you'll need two analog...

In Stock
[Buy Now](https://www.adafruit.com/product/512)
[Related Guides to the Product](https://learn.adafruit.com/products/512/guides)
### PSP 2-Axis Analog Thumb Joystick

[PSP 2-Axis Analog Thumb Joystick](https://www.adafruit.com/product/444)
Add a tiny joystick to your project with this PSP thumbstick. This is a replacement component for PSP1000's, but we think they'd make for a great little joystick/thumbstick add-on for a wearable, or portable project.  
  
The joystick is a 'self-centering' analog-type....

In Stock
[Buy Now](https://www.adafruit.com/product/444)
[Related Guides to the Product](https://learn.adafruit.com/products/444/guides)
### Tactile Switch Buttons (12mm square, 6mm tall) x 10 pack

[Tactile Switch Buttons (12mm square, 6mm tall) x 10 pack](https://www.adafruit.com/product/1119)
Medium-sized clicky momentary switches are standard input "buttons" on electronic projects. These work best in a PCB but [can be used on a solderless breadboard as shown in this tutorial](https://learn.adafruit.com/adafruit-arduino-lesson-6-digital-inputs?view=all). The...

In Stock
[Buy Now](https://www.adafruit.com/product/1119)
[Related Guides to the Product](https://learn.adafruit.com/products/1119/guides)

## Related Guides

- [Adafruit 1.44" Color TFT with Micro SD Socket](https://learn.adafruit.com/adafruit-1-44-color-tft-with-micro-sd-socket.md)
- [LO-LA59 Droid](https://learn.adafruit.com/lola-droid.md)
- [DRAFT PUNK](https://learn.adafruit.com/draft-punk.md)
- [Glowing Viking Rune wayFinder](https://learn.adafruit.com/glowing-viking-rune-artifact.md)
- [Hallowing M0 Spirit Board](https://learn.adafruit.com/hallowing-spirit-board.md)
- [Adafruit AMG8833 8x8 Thermal Camera Sensor](https://learn.adafruit.com/adafruit-amg8833-8x8-thermal-camera-sensor.md)
- [Ray Gun Blaster](https://learn.adafruit.com/ray-gun-blaster.md)
- [DotStar Belly Dance Fans](https://learn.adafruit.com/dotstar-belly-dance-fans.md)
- [Morning Star POV Double Staffs](https://learn.adafruit.com/pov-dotstar-double-staff.md)
- [Adafruit Airlift Bitsy Add-On - ESP32 WiFi Co-Processor](https://learn.adafruit.com/adafruit-airlift-bitsy-add-on-esp32-wifi-co-processor.md)
- [Cupcade: the Raspberry Pi Micro Arcade Cabinet](https://learn.adafruit.com/cupcade-raspberry-pi-micro-mini-arcade-game-cabinet.md)
- [Happy Chewbacca Mask](https://learn.adafruit.com/happy-chewbacca-mask.md)
- [Zelda: Breath of the Wild – 3D Printed Guardian Sword with NeoPixel LEDs](https://learn.adafruit.com/breath-of-the-wild-guardian-sword-led-3d-printed.md)
- [CircuitPython Display Support Using displayio](https://learn.adafruit.com/circuitpython-display-support-using-displayio.md)
- [Adafruit ItsyBitsy nRF52840 Express](https://learn.adafruit.com/adafruit-itsybitsy-nrf52840-express.md)
- [Color Balancing Video Camera Light feat. DotStars](https://learn.adafruit.com/color-balancing-light-box-with-dotstar-cool-warm-white-leds.md)
