Step 2: Prototyping and testing the circuit

Using the AtTiny 85 is a great choice for those who are familiar with Arduino, because you have the possibility to use the Arduino IDE to program it. This means that you can prototype the circuit with Arduino before deploying it to the AtTiny.

So I wrote this code, and I built a simple testing circuit with Arduino.

When the code works on Arduino, you are ready to deploy it on your AtTiny85

Step 3: Moving to AtTiny85

Programming an AtTiny with an Arduno can be tricky, but fear not! I made a very simple tutorial on how to do that with the latest Arduino IDE and Arduino Uno/diecimila or Arduino Leonardo/Yun. Just follow these steps, and you can easily use this sketch on the AtTiny85

Step 4: Testing the AtTiny85 based circuit

Now we can move the programmed AtTiny on a new breadboard, following this scheme

There is no resistor on the LED because I’m using a 3.3V coin battery. The circuit should start working as soon as you plug the battry: when the tilt sensor is shook, the LED fades 🙂