At the heart of the Adafriend (awwwww) is none other than a Pro Trinket, the more powerful (and spacious) big brother of the lovable Adafruit Trinket. With its fancy bootloader and USB programming, tiny size and price, and Atmega328 power, it is the perfect microcontroller for this project.
The Adafriend's beautiful face is a matrix of 64 leds controlled by an i2C backpack that comes in many different colors. From base eye movement algorithms from Phillip Burgess's many costumes and spooky LED faces, the Adafriend adds different emotions and behaviors as well as sensing and sound, and blinks sadly, happily, angrily, or indifferently at the world with one of these matrices.
The casing of the Adafriend virtual pet is 3D printed in two halves that slide together and screw closed with 4 5mm M2 screws. I highly recommend printing your case with a high quality 3D printing service online for the color and quality required of this project. Shapeways or Sculpteo are perfect, use a plastic material. If you print your case with a personal FDM printer, print at the highest quality possible to ensure a correct print.
This sensor has a tiny spring inside that when vibrated, acts like a switch and cloes the circuit between its two pins. This allows the cube to sense taps and shakes.
This tiny enclosed piezo element is what gives the Adafriend it's little voice! Be it singing a well known tune when happy, wimpering or grumbling, or even to let you know it sensed a tap, this little disk lets the Adafriend beep.
With an empty side of the Adafriend's cube-shaped body that was begging for something special, I decided to embed an IR LED and receiver to allow for communication between cubes, devious device meddling, universal off switch style, or to interact with remotes. The hardware is there, make the cube your own and hack in some extra functionality! I'd love to hear what you come up with!
In the color of your choice (green linked here)
Files found below!
4mm M2 machine screws x7
5mm M2 machine screws x4
With these parts and tools assembled, we can move on to building an Adafriend!