# Adafriend the Virtual Pet Cube

## Project Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/032/864/medium800/led_matrix__DSC0033_01EDIT.jpg?1465336141)

In this Pro Trinket powered project, build and 3D print yourself a friend, an Adafriend! This little colorful guy with an eye responds to taps and vibrations, and shows emotion on its little LED matrix front&nbsp;with a sad, neutral, happy, or angry face. It gazes around at its environment and blinks, plays spontaneous tones and patterns that correspond to it's emotional state, and even sings some recognizable tunes and themes when it's in the mood! If left alone for too long it gets lonely, but pester your pet too much and it may get angry at you! Build yourself an Adafriend and keep it happy to sing along with the coolest little cube around!

![](https://cdn-learn.adafruit.com/assets/assets/000/032/865/medium800/led_matrix__DSC0020_01EDIT.jpg?1465338691)

# Recommended Precursor Guides

Before embarking on this guide, I recommend you take a look at the&nbsp;[1.2" LED Matrix Backpack](../../../adafruit-led-backpack/1-2-8x8-matrix)&nbsp;guide to familiarize yourself with the core hardware and software of the guide. The Ruiz Brothers' guides also involve thin wires in tight spaces, here is their [profile](../../../../users/pixil3d). Also check out [Phillip Burgess's LED Matrix animating guides](../../../animating-multiple-led-backpacks/overview)&nbsp;for more LED eye costumes and creations, the base code and inspiration for this project!

# Complexity Warning
Danger: 

# Tools Needed

For this project you will need a soldering iron, solder, diagonal cutters, wire strippers, tweezers, a phillips screwdriver, a hot glue gun, and a lighter, heat gun, or blowtorch to shrink heat shrink tubing.

The&nbsp;[Hakko FX-888D](https://www.adafruit.com/products/1204), my personal favorite Soldering iron

![led_matrix_1204-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/032/858/medium640/led_matrix_1204-01.jpg?1465333517)

[60/40 rosin core solder](https://www.adafruit.com/products/1886)&nbsp;for easy flowing, strong solder joints

![led_matrix_1886-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/032/859/medium640/led_matrix_1886-01.jpg?1465333595)

[Flush diagonal cutters](https://www.adafruit.com/products/152)&nbsp;essential for quick, precise snips of wire and leads

![led_matrix_152-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/032/860/medium640/led_matrix_152-02.jpg?1465333659)

One thing you really can't skimp on is a good pair of [wire strippers](https://www.adafruit.com/products/527), these are the best balance of price and quality from Hakko, a very good buy

![led_matrix_527-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/032/861/medium640/led_matrix_527-02.jpg?1465333727)

[Fine tip curved tweezers](https://www.adafruit.com/products/422), perfect for guiding wires accurately into place for soldering and keeping fingers away from very hot things

![led_matrix_422-04.jpg](https://cdn-learn.adafruit.com/assets/assets/000/032/862/medium640/led_matrix_422-04.jpg?1465333767)

A [precision screwdriver set](https://www.adafruit.com/products/424)&nbsp;comes in handy for projects like this that require screws or some leverage, pick one up in the adafruit shop!

![led_matrix_424-05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/032/863/medium640/led_matrix_424-05.jpg?1465334109)

A hot glue gun is needed to secure the IR receiver and power switch in place.

![led_matrix_567346_1000_1_800.jpg](https://cdn-learn.adafruit.com/assets/assets/000/033/134/medium640/led_matrix_567346_1000_1_800.jpg?1466463337)

A standard lighter, blowtorch, or heat gun should shrink&nbsp;heat shrink tubing quite nicely

![led_matrix_White_lighter_with_flame.jpg](https://cdn-learn.adafruit.com/assets/assets/000/032/866/medium640/led_matrix_White_lighter_with_flame.jpg?1465347940)

With these tools gathered, we can move on to the cute little cube friend part of the guide!

- [Next Page](https://learn.adafruit.com/adafriend/parts-required.md)

## Featured Products

### Adafruit Pro Trinket - 5V 16MHz

[Adafruit Pro Trinket - 5V 16MHz](https://www.adafruit.com/product/2000)
 **Deprecation Warning: The Pro Trinket bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry the Pro Trinket so that people can maintain some older projets, we no longer recommend it.** Please...

In Stock
[Buy Now](https://www.adafruit.com/product/2000)
[Related Guides to the Product](https://learn.adafruit.com/products/2000/guides)
### Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy

[Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy](https://www.adafruit.com/product/2124)
If you have an ItsyBitsy or Pro Trinket you probably know it's the perfect little size for a portable project. This LiPoly backpack makes it really easy to do! Instead of wiring 2 or 3 boards together to make a charging system, this little PCB sits on top of the PCB and allows a...

In Stock
[Buy Now](https://www.adafruit.com/product/2124)
[Related Guides to the Product](https://learn.adafruit.com/products/2124/guides)
### Lithium Ion Polymer Battery - 3.7v 500mAh

[Lithium Ion Polymer Battery - 3.7v 500mAh](https://www.adafruit.com/product/1578)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 500mAh for a total of about 1.9 Wh. If you need a larger (or smaller!) battery, <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/1578)
[Related Guides to the Product](https://learn.adafruit.com/products/1578/guides)
### Breadboard-friendly SPDT Slide Switch

[Breadboard-friendly SPDT Slide Switch](https://www.adafruit.com/product/805)
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch no matter what size fingers you have, but not so easy that they'll get flipped by accident. Work great as...

In Stock
[Buy Now](https://www.adafruit.com/product/805)
[Related Guides to the Product](https://learn.adafruit.com/products/805/guides)
### Adafruit Small 1.2" 8x8 LED Matrix w/I2C Backpack - Pure Green

[Adafruit Small 1.2" 8x8 LED Matrix w/I2C Backpack - Pure Green](https://www.adafruit.com/product/1632)
What's better than a single LED? Lots of LEDs! A fun way to make a small display is to use an [8x8 matrix](https://www.adafruit.com/category/37_88) or a [4-digit 7-segment display](https://www.adafruit.com/category/37_103). Matrices like these are...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1632)
[Related Guides to the Product](https://learn.adafruit.com/products/1632/guides)
### Fast Vibration Sensor Switch (Easy to trigger)

[Fast Vibration Sensor Switch (Easy to trigger)](https://www.adafruit.com/product/1766)
The "poor man's" accelerometer/motion sensor! These spring-vibration switches are **high sensitivity** non-directional vibration induced trigger switches. Inside is a very soft spring coiled around a long metal pin. When the switch is moved, the spring touches the...

In Stock
[Buy Now](https://www.adafruit.com/product/1766)
[Related Guides to the Product](https://learn.adafruit.com/products/1766/guides)
### Small Enclosed Piezo w/Wires

[Small Enclosed Piezo w/Wires](https://www.adafruit.com/product/1740)
This small (14mm diameter) piezo element is nicely enclosed so you can attach easily. Piezo elements convert vibration to voltage or voltage to vibration. That means you can use this as a buzzer for making beeps, tones, and alerts, AND you can use it as a sensor to detect fast movements like...

In Stock
[Buy Now](https://www.adafruit.com/product/1740)
[Related Guides to the Product](https://learn.adafruit.com/products/1740/guides)
### IR (Infrared) Receiver Sensor

[IR (Infrared) Receiver Sensor](https://www.adafruit.com/product/157)
IR sensor tuned to 38KHz, perfect for receiving commands from a TV remote control. Runs at 3V to 5V so it's great for any microcontroller.  
  
To use, connect pin 3 (all the way to the right) to 5V power, pin 2 (middle) to ground and listen on pin 1. It doesn't do any decoding...

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

## Related Guides

- [Infinity Mirror Collar](https://learn.adafruit.com/infinity-mirror-collar.md)
- [Neopixel Cosmic Turtle Necklace](https://learn.adafruit.com/neopixel-led-magnetic-pendant-necklace.md)
- [Fiber Optic Whip](https://learn.adafruit.com/fiber-optic-whip.md)
- [Your Pulse Displayed with NeoPixels](https://learn.adafruit.com/pulse-sensor-displayed-with-neopixels.md)
- [Talking d20 20-Sided Gaming Die](https://learn.adafruit.com/talking-d20-20-sided-gaming-die.md)
- [Crystal Glow Knuckles](https://learn.adafruit.com/crystal-glow-knuckles.md)
- [Pro Trinket Tachometer](https://learn.adafruit.com/pro-trinket-tachometer.md)
- [Glowing Viking Rune wayFinder](https://learn.adafruit.com/glowing-viking-rune-artifact.md)
- [Adafruit Audio FX Sound Board](https://learn.adafruit.com/adafruit-audio-fx-sound-board.md)
- [Adafruit Pro Trinket LiPoly/LiIon Backpack](https://learn.adafruit.com/adafruit-pro-trinket-lipoly-slash-liion-backpack.md)
- [Animated Flying Toaster OLED Jewelry](https://learn.adafruit.com/animated-flying-toaster-oled-jewelry.md)
- [Morning Star POV Double Staffs](https://learn.adafruit.com/pov-dotstar-double-staff.md)
- [A NeoPixel Pomodoro Timer](https://learn.adafruit.com/a-neopixel-pomodoro-timer.md)
- [Pro Trinket as a USB HID Mouse](https://learn.adafruit.com/pro-trinket-usb-hid-mouse.md)
- [Tent Lantern](https://learn.adafruit.com/tent-lantern.md)
