How to program ATTiny85 with Arduino Uno (part 2)

This is the second part of the tutorial on how to program an AVR ATTiny85 chip with Arduino Uno. All the hard work has already been covered in Part 1, so make sure that you have completed the steps in that section before you continue!By default, the ATtiny85 runs at 1 MHz. You need to do an extra step to configure the microcontroller to run at 8 MHz. This is a requirement for using some popular libraries (like Software Serial), as well as to take full advantage of your chip. (more…)

ATTiny Line Follower

http://youtu.be/ZEQELKFFFJoContinuing to mess around with the ATTiny85 IC... I ported the code from my Arduino Uno line following robot to the ATTiny. Some changes were necessary to make it work:
  • The ATTiny has only 3 analog pins, so the sensor array has 3 TCRT5000 IR LED/Sensors instead of the 6 the original line follower had
  • The SoftwareServo library was needed, as the standard servo library that comes with the Arduino IDE does not work on the ATTiny
The code used is below, and more info on how to program the ATTiny chip using your Arduino as a programmer is available in this post. There is one more pin available on the ATTiny85, so I am thinking of adding an ultrasound sensor and some basic obstacle avoidance next. Here is the Arduino Code that runs on the ATTiny: (more…)