It was by chance I discovered Attiny Arduino devices. Due to the prize and size of the device could be a really powerful discovery for small and low-cost projects. But this is not an Arduino like the others, it is a small one so it could be a bit difficult to use the first time. So let’s see what can we do with that.
Programming process
In order to program this device it is necessary to use another Arduino. In this case I will use an Arduino Leonardo. It will be used as a ISP (In system programmer) programmer. The steps to follow:
Install Arduino Leonardo
Configure Arduino as a ISP programmer.
Add Attiny libraries to Arduino IDE.
Wire Attiny with Arduino Leonardo ISP.
Programm Attiny.
1) Install Arduino Leonardo
It is possible to install Arduino IDE in Linux, Mac and Windows. In this case I would choose Windows because for me it has been impossible to install under Linux. It is one thing I should have a look.
1.a) Windows
Go to Arduino web page and choose windows option in this case. Just open the Windows installation and left it installing. At this very moment I would use Arduino 1.0.5 that is the last release.
2) Configure Arduino as a ISP programmer.
After installing the Arduino IDE you have to program it as an ISP programmer. For that choose the programmer as and in “Archive” choose “Sketchsbook” inside choose “ArduinoISP”. In this part you have to replace the line that says :
by
that would define pin 10 as reset. In tools board choose “Arduino Leonardo” and press upload. This would end with your Arduino programmed as a ISP programmer.
You have to configure your Arduino as a programmer for Attiny. In order to avoid some problems it is necessary to define a new programmer with a different programming protocol. Just open this folder “/windows/Program Files (x86)/Arduino/hardware/arduino/programmers.txt” and add at the end:
3) Add Attiny libraries to Arduino IDE
Arduino doesn’t support Attiny by default so it is necessary to add some libraries. First of all download the libraries smeezekittyÔÇÖs core13 and for Attiny 45 here in case you want to install both just download this file Attiny_15_45_85. Copy this libraries inside /windows/Program Files (x86)/Arduino/hardware/arduino/cores/core13 for the first file and /windows/Program Files (x86)/Arduino/hardware/arduino/cores/ for the second one. If core13 folder doesn’t exist create it. Finally add to the end of the file /windows/Program Files (x86)/Arduino/hardware/arduino/boards.txt :
4) Wire Attiny with Arduino Leonardo ISP.
In order to wire Attiny13 you can follow this diagram taking in account that reset is pin number 10 as it is showed.
5) Program Attiny
The last but not the least is programming Attiny13. Just select, for example, the blink example setting up the proper output pin :
// the setup routine runs once when you press reset:
// the loop routine runs over and over again forever:
Select “Tools”, “Programmer” and “Arduino as ISP (leonardo)” and choose Attiny13 in “Tools”, “Board” , “Attiny13@…”. Finally add a led to the 0 pin in this case and upload the file to the Arduino Attiny13.
6) Where to go from here
Now I am ready to create a touch button to switch on and off the Raspberry pi.
I am a Spanish telecommunication engineer.I like social robotics, computers and almost everything with wires. Right now, I am working as a Software Engineer. Furthermore I am always happy to be involved in challenging projects.