Programming ATtiny84 / ATTiny44 with Arduino Uno

My order of ATTiny84 chips from Mouser arrived yesterday, so it is time to load the Arduino Blink example sketch onto it. I made a small line follower using the ATTiny85 a while back, and quite liked the idea of having a smaller, cheaper IC that can run simpler Arduino sketches. The ATTiny84 comes with extra 6 I/O pins (see datasheet), so it should be an even better replacement of an Arduino for smaller projects. Here is a beautifully rendered mapping of the ATTiny84 / ATTiny44 pins courtesy of  Alberto (PighiXXX):ATTiny84 ATTiny44 pinout (more…)

How to connect an Arduino Uno to an Android phone via Bluetooth

The purpose of this tutorial is to cover the basics of setting up a connection between  Arduino Uno and an Android phone via Bluetooth. Smart phones pack a ton of cool features (camera, accelerators, speakers, microphone, a nice screen to show data from your sensors, wi-fi adaptor...) that will make an excellent addition to a robot, or any other Arduino project. I will use Blueterm a basic free Android terminal emulator app to send a single digit (zero or one) from a phone to a BlueTooth module connected to the Arduino Uno via a serial…continue reading →

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…)

How to program ATTiny85 with Arduino Uno (part 1)

UPDATE, November, 2015: The article below was written for Arduino IDE versions, prior to 1.6.4. If you are currently using Arduino IDE 1.6.4, or later, follow the instructions in blog post instead.
This tutorial is based on the steps I took to program an ATTiny85 with my Arduino Uno and use the nifty little chip for a small line following robot. The idea for using the ATTiny came from the MAKE magazine and more specifically their "How-To: Shrinkify Your Arduino Projects" YouTube video.The ATTiny libraries for the Arduino IDE come from the High-Low Tech group at the MIT Media Lab. They have some other interesting materials for Arduino on their site as well.

Step 1: Collect all necessary hardware components

  • An Arduino Uno (or compatible board)
  • An ATTiny85 IC
  • One 10 uF capacitor
  • Breadboard and jumper wires

Line Following Competition Videos

We held our first line following competition last week. We knew ahead of time that right angle turns may cause some issues, so we set up a few to see what happens. We did have some challenges, like you can see here: But at the end we had several clean runs and a winner: reading →

ATTiny Line Follower 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…)

Project 2: Arduino Line following test 3

Test #3 of my Arduino Uno controlled line following bot for the upcoming competition. This test was focused on checking how the bot handles 90 degree turns with sharp corners, line intersections and line breaks. robot uses 6 TCRT5000 IR reflector sensors positioned in a line. (more…)

Project 2: Line following bot – Tests 1&2

This is a very basic line following robot using 4 IR led sensor receiver pairs in a line, continuous rotation servos and Arduino Uno. The wheels are made from beer coasters and I was planning to add a wheel encoder using another IR led / sensor pair at a later stage. The logic is very simple, but works well to test the line detection and the basic movement commands. The next step should be applying a better control mechanism, maybe PID? (more…)