Example Projects
Circuits and Code Wireless

Conductive Materials
Non-Conductive Materials
Thinking Out Loud
Circuits and Code
  • Arduino Overview
  • Arduino as Bluetooth HID
  • ATtiny: 7-Segment Display
  • ATtiny: Capacitive Sensing
  • ATtiny: Programming
  • ATtiny Serial & Wireless Boards!
  • ATtiny: Soft Serial
  • ATtiny: Sound
  • ATtiny: Soft Fade
  • Multiplexed Matrix
  • Controlling EL Panel and EL Wire
  • EL panel/wire inverter hack
  • Heat Controlling Circuit
  • LED with Light Sensor
  • Lilypad XBee Shield
  • Pull-up Resistors
  • RGB Colour Fade
  • simple heat circuit
  • Solar Powered Motor Circuit
  • Sound Amplifying Circuits
  • Teensy as HID Device
  • Transistor Switch
  • Volume Detection
  • Visualization: 2x2 Matrix
  • Visualization: Drawing
  • Visualization: Graph
  • Visualization: Pressure Sensor Matrix
  • Visualization: Touchpad
  • Voltage Divider
  • About
  • E-Textile Spaces
  • Newsletter
  • Shopping Local

    Content by Mika Satomi and Hannah Perner-Wilson
    The following institutions have funded our research and supported our work:

    From 2013-2015 Mika is a guest professor at the eLab at Kunsthochschule Berlin-Weissensee

    From July - December 2013 Hannah was a researcher at the UdK's Design Research Lab

    From 2010-2012 Mika was a guest researcher in the Smart Textiles Design Lab at The Swedish School of Textiles

    From 2009 - 2011 Hannah was a graduate student in the MIT Media Lab's High-Low Tech research group led by Leah Buechley

    In 2009 Hannah and Mika were both research fellows at the Distance Lab

    Between 2003 - 2009 Hannah and Mika were both students at Interface Cultures
    We support the Open Source Hardware movement. All our own designs published on this website are released under the Free Cultural Works definition
    Circuits and Code

    ATtiny: Programming

    This post is a summary that covers how to turn your arduino board into an ISP programmer and use it to program an ATtiny85 or 45 8-pin microcontroller.

    The instructions in this post are based on the following two tutorials written by David Mellis:
    Arduino board as ATtiny programmer >> http://hlt.media.mit.edu/?p=1706
    Programming an ATtiny w/ Arduino 1.0.1 >> http://hlt.media.mit.edu/?p=1695

    If you get fed up with all the wires, see how to make your own ATtiny programming shield for Arduino:
    >> http://www.kobakant.at/DIY/?p=3996

    Turning your Arduino into an ISP Programmer

    What is an ISP (In System Programmer)???
    The answer >> http://en.wikipedia.org/wiki/In-system_programming

    1 Materials and Tools

    – Laptop with the Arduino software version 1.0.1 or 0022 installed
    – Arduino Uno or Duemilanove (with an ATmega328, not an older board with an ATmega168!)
    – USB cable
    – ATtiny45 or ATtiny85 (Sparkfun, DigiKey, RS)
    – 10 uF capacitor
    – Breadboard
    – Jumper wires

    2 Download and Save the ATtiny Folder

    – Download the “ATtiny” folder from this GitHub repository:
    >> https://github.com/damellis/attiny/tree/Arduino1
    – In your Arduino sketchbook folder create a new sub-folder called “hardware”
    – Put the “ATtiny” folder inside this “hardware” folder
    – You should end up with folder structure like this: “Documents > Arduino > hardware > attiny”

    – Quit and restart the Arduino software
    – Look inside the “Tools > board” menu and you should see the ATtiny entries

    3 Upload “ArduinoISP” to your Arduino

    – Open “ArduinoISP” sketch from “Examples” folder
    – Select “Arduino Uno” from the “Tools > Board” menu
    – Upload sketch

    Using your Arduino ISP to Program an ATtiny Microcontroller

    1 Wiring your ISP connection

    ATtiny —– Arduino
    Pin PB2 (SCK) —– Pin 13
    Pin PB1 (MISO) —– Pin 12
    Pin PB0 (MOSI) —– Pin 11
    Pin PB5 (Reset) —– Pin 10
    Plus (VCC) —– +5V
    Minus (GND) —– GND

    10uF Capcitor:
    Arduino pins: RESET —-||—- GND

    How a breadboard is internally connected:

    How to connect the Arduino and the ATtiny using the breadboard, jumper wires and one 10uF capacitor:

    2 Burn Bootloader

    To set the clock speed of your ATtiny to be faster (8Mhz) than the default 1 MHz.
    – Select “ATtiny45 (8 MHz)” from the “Tools > Board” menu
    – Select “Arduino as ISP“ from the “Tools > Programmer” menu
    – Select “Burn Bootloader” from the “Tools” menu

    “ATtiny45 (8 MHz clock)”:

    “Arduino as ISP”:

    “Burn Bootloader”:

    3 Writing a Sketch for the ATtiny

    Download the ATtiny25/45/85 datasheet >> http://at.rs-online.com/web/p/microcontroller/6962339/

    The following Arduino commands are supported for the ATtiny:


    4 Uploading a Sketch to the ATtiny

    – Open the sketch you want to upload to ATtiny
    – Select “ATtiny45 (8 MHz)” from the “Tools > Board” menu”
    – Select “Arduino as ISP“ from the “Tools > Programmer” menu
    – Upload sketch
    – The following error message is okay:

    avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
    avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny8


    – Once you have added parts to your circuit that connect to the programming pins of the ATtiny, you may need to disconnect these parts before uploading a new program.
    – Once you have programmed your ATtiny, you may need to remove the programming connections in order for your circuit to function correctly.
    – Make sure you have a compatible version of the Arduino software installed. At the time of writing this post version 1.0.1 worked, but verion 1.0 had bugs and version 1.0.2 was not working at all.
    – Remember to remove the capacitor when uploading the Arduino ISP sketch to the Arduino Uno or Duemilanove and to put the capacitor back for burning the bootloader and uploading any sketches to your ATtiny.
    – Declare IN- and OUTPUTS refering to the pin’s port number: pinMode(PB#, INPUT);
    – When reading an analog input, refer to the pin’s ADC number: analogRead(ADC#);
    – To set the internal pull-up resistors write the following into the setup() function:
    pinMode(4, INPUT);
    digitalWrite(4, HIGH);

    Because we have declared pin 4 to be an INPUT, writing HIGH to the pin will set the internal pull-up.


    Turning your Arduino into an ISP Programmer

    No capacitor!
    1. Download the Arduino software and install it
    2. Download the ATtiny folder and save it in a “hardware” folder in your Arduino sketch folder
    3. Restart Arduino
    4. Open “ArduinoISP” sketch from “Examples” folder
    5. Select “Arduino Uno” from the “Tools > Board” menu
    6. Select “/dev/tty/usbserial###” from the “Tools > Serial Port” menu
    7. Upload sketch

    Using your Arduino ISP to Programming an ATtiny Microcontroller

    Add capacitor and programming connections!
    1. Select “ATtiny45 (8 MHz)” from the “Tools > Board” menu
    2. Select “Arduino as ISP“ from the “Tools > Programmer” menu
    3. Select “Burn Bootloader” from the “Tools” menu (yes capacitor)
    4. Open the sketch you want to upload to the ATtiny
    5. Upload sketch (yes capacitor)

    The following error message is okay:

    avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
    avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny8
    9 Comments so far

    1. HOW TO GET WHAT YOU WANT on November 27th, 2013
    2. Otega on May 27th, 2014


      I need help in programming the atiny85 via arduino. i need it to give a pwm output when it receives commands from a Bluetooth connected. Can I get help from you? please it will be a big help in my project. I look forward to your response.


    3. alex on May 31st, 2014

      thanks very much for this information. it was very clear and concise and helped me solve a board sync problem that i had been trying to solve for a few days.

    4. backalla on October 5th, 2014

      I have an ATtiny45-20PU.. Which I guess has a clock speed of 20MHz.. If I burn the bootloader by selecting ATtiny45 with 8MHz clock.. Will I be able to upload the program that is meant for 8MHz one..

    5. Mohan on November 13th, 2014

      You can program ATtiny13/15/25/45/85 with these shield also. I found one here its very cheap and easy no jumpers and breadboard needed.

    6. kara on February 11th, 2015

      Can we programme all the chips used in arduino boards in this way in standalone form?

    7. Mohan on March 6th, 2015

      http://www.htlinux.com/product/attiny-isp-shield Here is the ATTiny ISP Shield makes the job very much easier.

    Leave a comment