How To Program ATtiny85 With Arduino Uno | Arduino Project

by | Nov 29, 2022 | Arduino, Coding

Home » Coding » How To Program ATtiny85 With Arduino Uno | Arduino Project


Let’s do a coding project on How To Program ATtiny85 With Arduino Uno. This comes under IoT (Internet of Things).

  • ATtiny85 is a microcontroller just like Arduino but has less memory, IO pins, and form factor.
  • Arduino Uno has 14 Digital Pins, 6 analog pins, and Other pins for power supply, grounding, reset, etc.

In this project, we will use a microcontroller – ATtiny85 and will blink two LEDs simultaneously using it.



In order to program ATtiny85 With Arduino Uno, you can implement it using Tinkercad for simulation. Whereas if you want to do a physical project, you can buy these components from any electrical store. We will require the following components:


Circuit Diagram

Steps On How To Program ATtiny85 With Arduino Uno

Step 1: Gather all the components on the Digital Board of the Tinkercad platform or on the Physical Table.

Polarised Capacitor:

Step 2: Connect the Positive terminal of it to the RESET pin in Arduino Uno R3.

Step 3: Connect the Negative terminal of it to GND in Arduino at the analog side using a Black colored wire.

LEDs & ATtiny:

Step 6: Connect the LEDs & ATtiny85 to the BreadBoard – Small.

Step 7: Connect the Anode terminals of the LED to the resistor’s one end.

Step 8: Connect the second end of the resistor to the 5V pin of the Arduino Uno.

Step 9: Connect the Power terminal of ATtiny to the 5V pin of Arduino Uno.

Step 10: Connect the PB0, PB1, and PB2 terminals of the ATtiny to pin numbers 6,5 & 4, respectively.

Step 11: Connect the PB3 and PB4 terminals of the ATtiny to the cathode terminal of each LED, respectively.

Step 12: Connect the GND terminal of ATtiny to GND in Arduino on the analog side using a Black colored wire.

Source Code

int ledBlue = 3;
int ledGreen = 4;
void setup()
pinMode(ledBlue, OUTPUT);
pinMode(ledGreen, OUTPUT);
void loop()
digitalWrite(ledBlue, HIGH);
digitalWrite(ledGreen, LOW);

digitalWrite(ledBlue, LOW);
digitalWrite(ledGreen, HIGH);


Explanation of the Code

To Program ATtiny85 With Arduino Uno, we need to input the code.

1. In the beginning, we have initialized two variables to the respective terminal of the ATtiny they are connected with.

2. After that, we used two functions, namely setup() and loop().

3. In the setup() function, we are declaring which pin will be used for output purposes.

4. In the loop() function, we are giving High voltage power to 1 pin and, at the same time, giving Low to another.

5. We are doing it using a delay function, which takes time in milliseconds.

6. After that, we are exchanging the LEDs power supply from low to high and high to low.

7. Since it’s under the loop() function, we will continue on and off the LEDs.


On running this source code on how to Program ATtiny85 With Arduino Uno successfully, you will get the below-shown output.

Programming ATtiny85 With Arduino Uno

Each LED will blink after some coding time period.


More Arduino Projects>>>

You May Also Like To Create…


Submit a Comment

Your email address will not be published. Required fields are marked *