Output devices
Click here to see the group assigment
How to install the librarie of Attiny
To start programming a PCB with Arduino you have to install its library and to do this, we must open the "Preferences" option and add the library in "Additional boards manager URLs"NOTE: I had a problem with the link that my instructors shared with me, because it marked an error when trying to upload the code to the microcontroller, so we looked for a different one on the internet.
https://descartes.net/package_drazzy.com_index.json
And since an Attiny requires another microcontroller to be programmed, I used an ARDUINO UNO as a programmer, but it must be configured for this purpose.![](../assets/images/week 09/1.png)
ARDUINO as ISP
For an Arduino to work as a microcontroller we must select the "Examples" option and click on the "ArduinoISP" option.We connect the Arduino to the Computer and in the "Tools" option we select "AVR ISP" and we proceed to load the code into the ARDUINO
![](../assets/images/week 09/2.png)
Attiny configuration
To program the Attiny, we must first "burn Bootloader" and to do this you must connect the Attiny to the Arduino with Jumpers and Change the state of the Arduino from "AVR ISP" to "Arduino as ISP"![](../assets/images/week 09/3.png)
Attiny connection
![](../assets/images/week 09/5.png)
NOTE: You must make sure you have this configuration before clicking on the "burnbootloader" option
![](../assets/images/week 09/4.png)
We´re ready to program
Let´s start to program somthing
![](../assets/images/week 09/6.png)
VERY IMPORTANT
To load the code in Attiny you have to use the option
"Upload Using Programmer"
Blink Blink!
How to turn on one led
Click to download code
![](../assets/images/week 09/7.png)
Left... Right... Again!
How to move one servomotor
Click to download code
![](../assets/images/week 09/8.png)
Right-On Left-Off
All the same time
Click to download code
![](../assets/images/week 09/9.png)