Introduction
So you have been playing around with Arduino, you want to build something really small that doesn’t really need to use that many pins or pull much power? Then the answer is ATtiny85. The chip only has eight pins, of which five are available to use with programming. As the picture above hints you can use three pins for analogRead() (i.e. sensor readings) and you can use two of them for PWM action. However all of them can be configured to act as digital pins via pinMode().
The ATtiny can run on anything from 1.8V to 5.5V which means you can easily run it off something as small as a button cell battery. I have successfully had it run leds, read buttons, play beepy sounds, run a small phone vibrator and even played around trying to use it in a ring (electro jewelry FTW!).
These chips are reprogrammable so I suggest you put them in a socket to allow for changing the behaviour or just correct bugs.
BUG:
As of March 2021 it seems that you need to have Arduino 1.6.x and no later for this to work. Otherwise Arduino IDE won’t know how to compile for ATtiny for some reason. I’m sure this will change in the future, but you can get an old version here: https://www.arduino.cc/en/Main/OldSoftwareReleases
FULL TUTORIAL
Here is a full tutorial on how to get going:
https://www.jasonacox.com/wordpress/archives/518