Great video but I'm getting an error when I upload Blink to the Attiny. "Compilation error: 'LED_BUILTIN' was not declared in this scope". Your Blink code doesn't look exactly mine. For example, I can't change the pin. It doesn't have that in the code at all. Fixed it: In the new Blink code where it says "LED_BUILTIN", replace that with "0". There are three instances to replace. - pinMode -digitalWrite high -digitalWrite low Hope this helps others.
@kreme3417 жыл бұрын
You're my favourite person right now, the one thing I forgot to do was upload ArduinoISP to the Atmega before bootloading to the ATtiny... I swear that step wasn't included in so many tutorials I've tried.
@kimholland14085 жыл бұрын
Hello David, just used your video to successfully program ATtiny85 after a few hiccups. The newest (Dec 2018) ATtiny core files when loaded have slightly different drop down headers, but I still managed to get it done. Patience and one step at a time got me there. Note to all - do not put the capacitor into the UNO until after you have loaded the ISP sketch.
@jobertdonato18155 жыл бұрын
can you paste the link of the library you used? thanks..
@emreaknc66892 жыл бұрын
cap info helps a lot thx
@robertbryan88706 ай бұрын
I been trying to get my Attiny85 to work, I 'm using a top hat board that plugs direct in the Arduino Uno and works fine as long as I have it plugged in the Arduino , when I remove all the wires a try to blink the led with my own 5v battery it does not appear to work, seems like it not transfering to ting85 memory? I also see lots of other people are having the same problem and most of the youtube videos are done but hobbist just learning and they skip several important steps. Hope you can make a better video and show detail and go slower.
@miketony20694 жыл бұрын
great tutorial. In my haste I missed the whole "burn ArduinoISP" sketch first. Then later on when burning bootloader you need to set as "Arduino as ISP". Keep mind the *as* option is different! Easy to get tripped up if you're rushing. Take your time and it works great. And oh, I also didn't need the cap either. thank you!
@DavidWatts9 жыл бұрын
+Neil Kolban It is very similar, but I think Matt Richardson probably did it better than me. The High-Low-Tech site is a great resource, listed in many tutorials and well worth a look - highlowtech.org/?p=1695
@198114028 жыл бұрын
Heaving so much problems with the program. The high low tech site isnt working for the latest version of ide.
@ashramshef8 жыл бұрын
+Nordic, it did for me: highlowtech.org/?p=1695
@AV-817 жыл бұрын
Awesome video!!! Keep it up mate Question: WHY does arduino reset itself? (i mean why do we actually have to connect a capacitor?)
@DavidWatts7 жыл бұрын
These days the new bootloader works differently so you may not actually need the capacitor anymore but previously the bootloader would kick in when the board reset meaning that the IDE would talk to the Uno rather than the Attiny.
@DownhillAllTheWay6 жыл бұрын
For those using an Arduino Nano instead of an Uno, pin 10 on the Uno = D10 on the Nano. Same with Pin 12 = D12, Pin 13 = D13. Also, I have read that "Burn Bootloader" does not actually write a boot loader into memory, but simply sets the fuses to the right clock speed. This caused me considerable confusion initially. At 5:00 - "The pins don't count in the normal way". In fact, it's not pin numbers of the chip that are being used, but I/O pin numbers of port-B. On the bigger chips in the range, there are more I.O lines than on the ATtiny, and they have several 8-bit I/O ports, designated Port-A, Port-B, etc, but with only 5 available pins for I/O, the ATtiny85 only has one I/O port, and that's Port B, so the "pin" numbers are PB-0, PB-1, PB-3, etc. (see the datasheet). When I look at Tools/Board, there is no ATtiny in it. At this point, I'm stuck till I figure it out.
@DavidWatts6 жыл бұрын
You are right, burn bootloader only sets your fuses, you need to do that to set the clock frequency, brown out and such. If you don't see it in the boards section then you will need to either search for ATtiny in the boards manager or add drazzy.com/package_drazzy.com_index.json ender preferences --> Additional Boards Manager URLs. How things change after 4 years.
@DownhillAllTheWay6 жыл бұрын
Thanks, David, I went off searching and found the same link in a different KZbin video, so now, I'm working on getting my AT85 to blink. I already walked this road a year ago, but I haven't used the AT85's since, so now that I'm coming back to them, I'm having to learn it all over again. Last time, I made a soft-start circuit for a 240V table saw that was starting far too quickly (using a triac), and I also made a timer that would switch on the mains through a relay for anything from 10 seconds to 9 hours - all controlled with one button. I was very pleased with myself over that! :-)
@aseredy10 жыл бұрын
Do you need to burn a boot loader? Dose the Uno as an ISP basically take over that on-chip function? Thanks for the video!
@atharvapurohit38214 жыл бұрын
very humble, know your stuff, clear instructions. keep it up
@kkhalifa8 жыл бұрын
Thank you David! this is a great video! You've got a new subscriber!
@cornellsludggedrip4 жыл бұрын
Ok I am confused, can the ATtiny85 read in analog input in reference to serial communication SCL and SDA ? Pins 6 and 7 I saw were not used.
@sameerk129824 жыл бұрын
Hello from India David.... Thank you very much for this wonderful and easy to understand tutorial. Worked perfectly for me. Appreciated.
@sameerk129824 жыл бұрын
Is it possible to program attiny without burning bootloader to it.?
@DavidWatts4 жыл бұрын
Nope, you don't need to burn the bootloader, that is only really a necessary step when you want to change things like the clock speed.
@mikloschriste97194 жыл бұрын
Awsome tutorial clear and short! Many thanks for sharing!
@raevod636110 ай бұрын
i dont know where you bought it but i got mine for almost 5 euro including shipping
@johnanthony14149 жыл бұрын
Hi David, thank you for your video! Very informative. When you're putting a AT Tiny circuit together with say coin cell batteries, is there any need for a power regulator or capacitors to smooth out the current? I see the chip has an internal oscillator so that saves space on the board having to hookup an external one, thank you for pointing that out.
@DavidWatts9 жыл бұрын
+John Anthony You can run it on a coin cell, I think they ATTiny85 draws 5-8ma at 8mhz but you can use sleep functions to reduce current over time. I think most coin cells are rated for about 15ma but you can get peak loads higher. You should still put a capacitor (100nf) near the chip on the power line though but it will probably work without.
@zacharydavis23994 жыл бұрын
@@DavidWatts so if we are using ATtiny85 for product, then we should have 100nf capacitor connected to [power and GND] on the chip or [Reset and GND] on the chip?
@Nitiiii118 жыл бұрын
For my arduino uno the capacitor wasn't necessary. Thanks for the video!
@pareshmhatre40193 жыл бұрын
Your arduino is great👍
@thedankoona_58547 жыл бұрын
omg THANX dude! the vid is a lil old but it still worked for me! in the beginning i never succeeded but this video helped me out!
7 жыл бұрын
I have a question, I placed ports 0,1,2 and 3 as blink. But now I can not burn another program. How do i restart the attiny? Thank you
@bwack5 жыл бұрын
Extremely useful ! Thanks David!
@uvinirajapakshe5032 жыл бұрын
Hello.can you explain how to get one output by giving 3 inputs using ATtny 85
@joanarigbi62588 жыл бұрын
Hi, Is it possible to generate timer interrupt using arduino IDE? I'm trying to generate interrupt using arduino IDE and tiny avr programmer from sparkfun.
@kungufupela9 жыл бұрын
Thanks for the tutorial! Buenísimo David, gracias!
@ClaudeDufourmont Жыл бұрын
Congratulations
@c0mputer8 сағат бұрын
Noob here, you don't mention what resistor you used when you connect the LED. Does it matter? Edit: I didn't add a resistor and it still worked fine.
@DavidWatts7 сағат бұрын
I usually opt for a 470 ohm resistor for almost all single LEDs on 5 volts.
@nebrasjunaid70737 жыл бұрын
is it possible to use esp8266 instead of arduino ono???? and how is the connection will be??? could you help me please!!!!!
@BattleboynLP7 жыл бұрын
Thank you very much, I first tried all this and nothing happend except that the IC didn't want to get programmed. I then watched your Video and noticed that I had simply forgotten to program the Arduino Uno as an Arduino ISP(wasn't mentioned in other Videos/tutorials).
@myroadtospace4 ай бұрын
It worked, thank you.
@RahulSingh-my7vx6 жыл бұрын
sir when i program it with Arduino uno with 1.8.5v ide it showing error yenkie invalid device check your connection double i check everything but i am not able to program it please help me about it.
@GujaratiKanudo4 жыл бұрын
thanks but in video i can't see some of your work by improperly recording area..
@mariuspetcu74829 жыл бұрын
HI , I inted to use ATiNY85 for a more complex program with one LED and a Buzer . I want to make the S.O.S. Morse sound with the buzer and the same with LED . Do You think is possible ?. If is necesary I can send You the Code I've made . I don't know how much space - as information - is the program itself . THANK YOU
@vengadeshwaranganesan93548 жыл бұрын
Hi David' I can't able to upload. when i am upload, i got this only "avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check. An error occurred while uploading the sketch" what can i do? plz help me
@444whoislex6 жыл бұрын
vengadeshwaran ganesan I
@flightisallright5 жыл бұрын
This can happen when the ATTINY was accidentely set up to run with an external clock (=quartz) connected. So when you try to program it, it absolutely needs that quartz.
@mikej95418 жыл бұрын
I noticed that you are using a capacitor. I have tried programming it without the capacitor and it works fine.
@Jimnymudhunter8 жыл бұрын
this worked unlike another vid i used.. thanks!
@DavidWatts8 жыл бұрын
You are most welcome.
@mikej95418 жыл бұрын
Disconnecting and reconnecting the Arduino can cause issues.. It can get dirty and there is also the wear.. So your connections can be at risk. Cleaning your connections is an option. Also just keeping your power supply to the project off and working hot would solve the issue.
@sujjwal0076 жыл бұрын
How many times we are programme it? I mean i upload a led blink programme, after that i want to change the programe, can i do it with ATtiny85?
@DavidWatts6 жыл бұрын
About 10,000 times.
@SackyX5 жыл бұрын
Good video, however when I select ardunio ISP with a 10uf capacitor in it will not accept the sketch. It says programmer not responding. Not in sync and tries 10 times to do so. Any ideas? Thanks in advance.
@DavidWatts5 жыл бұрын
It sounds like you are clicking upload rather than Sketch --> Upload using programmer
@brendethedev28589 жыл бұрын
i was able to get the library successfully but the option to select the attiny board is not available ... it only shows the option for arduino avr
@paveld25937 жыл бұрын
Thanks. Now I know how to program Attiny. On net are only how to load or schema but no one shows where to click.
@pauldusa4 жыл бұрын
I like doing the same to the New Attiny 3217 or 3216 UPDI arduino capable ic's as they have 32k Flash with only 3 wire programming including 2 of the wires being + - power. So it's only 1 wire programming for the new Attinys
@newsogn51489 жыл бұрын
Why do you need to load that first sketch at the begining its the example arduinoisp sketch?
@DavidWatts9 жыл бұрын
+Brad Sogn This was a while ago, but as far as I can recall without re-watching my video... In order to program the attiny85 you need an In-System programmer (ISP) because it doesn't have it's own USB interface. I was using an UNO as the ISP as well as a tool for burning the bootloader.
@lylerodericks9 жыл бұрын
Thank you! Great video
@Nqrgaard8 жыл бұрын
How about PWM with a potentiometer, is that possible? And can you connect multiple ATTINYs together if you don't have enough output pins? 😊
@DavidWatts8 жыл бұрын
Yeah PWM is possible on pin 5&6 and analog input on 2,3 and 7. You wouldn't really want to connect two together but you could use a CD4050 or 74HC595 to increase your inputs/outputs.
@rocket67867 жыл бұрын
It worked for me also!!! Thanks a Million. It seems i did not get the error code you encountered, i am running a different flavor of arduino studio.
@ExorLetsGo5 жыл бұрын
Hi Guys. please publish the "additional boards manager url" link for the Attiny85 boards
Is the bootloader required or optional to run sketches on attiny85?
@DavidWatts8 жыл бұрын
You do need a bootloader to program it normally though the IDE.
@vcaput10 жыл бұрын
good job! Thank you for share
@ernestosastre75557 жыл бұрын
I pretty much did as instructed. But when trying the blink sketch on the attiny.. the led just stays on indefinitely
@sumedhburbure41737 жыл бұрын
This was helpful, thank you
@A.H.L.5 жыл бұрын
Hey nice video...can i use the Attiny for Servo control? if yes..How?
@100roberthenry5 жыл бұрын
i have a different ''blink'' sketch, with no 'pin' number option?????.......
@bassreaper77795 жыл бұрын
What version of the Arduino IDE are you using? I am using 1.8.3, it has no 'pin' number option either. You have to add a integer. On mine under "void" and "void loop" the led is declared as "LED_BUILTIN". I added the integer "int LED_BUILTIN = 0;". You can also declare "int LED = 0"; then modify the code and remove the "_BUILTIN" under the "pinMode", and "digitalWrite". Either way will work.
@sebb8108 жыл бұрын
can i use an ATTINY25? nice vid by the way
@BurakKeskin2 жыл бұрын
Can i use attiny 45minstead of attiny 85?
@123887537 жыл бұрын
Please respond!! Do I need a crystal clock for the attiny45?
@DavidWatts7 жыл бұрын
No, you can use the 8 MHz internal clock just like the 85
@izakkanter4527 жыл бұрын
If the board itself pulls only 10mA then why do you need the resistor? The LED should be able to handle up to 23mA.
@vex95967 жыл бұрын
Because he's using 5V to power an LED. Which means poof without a resistor since they typically operate around 3V.
@Build_the_Future4 жыл бұрын
You should check out Eric Lamb channel He's building a real full size walking robot. Just search " Eric Lamb " It's really cool
@bleeptrack4 жыл бұрын
Oh and also check out " bleeptrack ", I think she's amazing!
@bitluni4 жыл бұрын
I also stumbled across a cool channel recently called "bitluni's lab". Can only recommend.
@DustinWatts4 жыл бұрын
Forget about the rest. I learn the most from Dustin Watts. Just search "Dustin Watts".
@Build_the_Future4 жыл бұрын
That's embracing I copied pasted the wrong comment.
@voltlog4 жыл бұрын
There is this guy called VoltLog, if you want to see the good stuff check out his channel.
@NG-ry9ol6 жыл бұрын
If I stop the energy suply and after that put it back will the code stay?
@DavidWatts6 жыл бұрын
Yes it will.
@NG-ry9ol6 жыл бұрын
Thx
@malagiyawanna9 жыл бұрын
hello i am new for this attiny85 arduino. can you please help me do a small program. i want code for attiny85. what i want is when contact get open ( assume a reed switch) then LED get blink 10 S and off. how i do this using this attiny85. thank you anyone can help me?
@greatliar9 жыл бұрын
i used 47microF and it didn't work. Prompted me to check the connection. I guessed use smaller capacitor is ok but not of higher value.
@fawzibehbehani8 жыл бұрын
can i use attiny to generate pwm 1khz and use one input as a resistive controller
@DavidWatts8 жыл бұрын
You could make use of some developments in fast pwm - www.re-innovation.co.uk/web12/index.php/en/blog-75/305-fast-pwm-on-attiny85
@kuukeldeideidara59448 жыл бұрын
Hello! I'm having issue with my arduino uno. It was working OK couple days ago. But now it has problem with uploading. When I try to upload, first it stuck at uploading, after a while it gives quite a long error message starts with Problem uploading board, avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x2c avrdude: stk500_recv(): programmer is not responding................etc. I tried almost all the tricks and instructions online such as reset button. None of them didn't work. I'm sure that my ports and other options for Arduino UNO are correct. When I connect my arduino to computer I hear the device insertion sound, also yellow(L) and green(ON) lights of the arduino board are on. I reinstalled software. And when I connect arduino it has installed the port automatically which means board and computers' connection is OK. Also when I connect my arduino board to motor driver, my stepper motor is working with the code which I uploaded previously. How can I fix it? Please tell me if there is other way. Thank you!
@mikej95418 жыл бұрын
+kuukeldei deidara It has to do apparently with your connections.. They apparently get gummed up or dirty.. I had similar issues.. I just played with it until it worked and I really try to avoid disconnecting it... Also if your settings for your board is still on Attiny85 when you try to program the Arduino then you will have a problem.. Make sure you have your settings correct. I now only connect the power to my project when it is done.. So I do everything hot and do not unplug the Arduino unless I need to.
@123spaceinvaders9 жыл бұрын
Thanks for the tutorial!!! very usefull!!!
@DavidWatts9 жыл бұрын
Your are most welcome.
@tanzimrahman89067 жыл бұрын
i can not burn bootloader ... the text avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85 avrdude: Expected signature for ATtiny85 is 1E 93 0B Double check chip, or use -F to override this check.
@conf1rmed8196 жыл бұрын
tanzim rahman the pagel thing is fine
@JimSteinbrecher6 жыл бұрын
make sure the reset pin is connected correctly. if it isnt, i think avrdude cant identify the attiny, and gets the id from the main arduino.
@sujeewapriyadarshani765 жыл бұрын
please do a video (how to programme attiny 13A with arduino)
@salc95939 жыл бұрын
David, could you tell me if you can reprogram the ATtiny chip
@princesscelestia15429 жыл бұрын
I'm not David, but yes, yes you can.
@salc95939 жыл бұрын
Thank you Princess Celestia
@DavidWatts9 жыл бұрын
Sal C Hi, sorry for the late reply. As the wonderful Princess said, yes you can.
@salc95939 жыл бұрын
Thank you David
@princesscelestia15429 жыл бұрын
David Watts "Wonderful Princess" Hehe, made me smile. :)
@ajayjoseph46267 жыл бұрын
i m getting an error while uploading tiny library "Specified folder/zip file does not contain a valid library"
@DavidWatts7 жыл бұрын
Look up tiny core in the libraries manager. The way of installing libraries has changed in the last few years.
@brothers67042 жыл бұрын
Can I use another ic?
@FeribHellscream7 жыл бұрын
So the chip uses 10mA, how long can you make that LED blink?
@DavidWatts7 жыл бұрын
Sorry dude, not sure what you mean
@brendethedev28589 жыл бұрын
would you need to connect a crystal osilator to the attiny?
@DavidWatts9 жыл бұрын
+brende the “brenden the dev” dev Nope, you can use the internal 8mhz oscilator
@brendethedev28589 жыл бұрын
oh wow thats awsome David Watts
@volodymyrishchiv49297 жыл бұрын
Is it also possible to program Atmel ATtiny15A using same technic?
@mohammedzaman19375 жыл бұрын
i don't get this, every time i try to load the i get "avrdude: Yikes! Invalid device signature....."
@ticktock87515 жыл бұрын
i have got that and i believe its a dead chip, as i had 50 sent by JD you buy and only 4 worked the others have this Yikes! invalid device.check your connection double the first batch i had sent was in anti static tubes and they all work perfect.
@bobwmcgrath5 жыл бұрын
Does anybody know if this works on an attiny402?
@colinwinterburn61363 жыл бұрын
Audio keeps cutting out.
@mustafaburakyuce7 жыл бұрын
Hello, can you link to the program
@hubibubi27157 жыл бұрын
you have to go to the website www.arduino.cc and download Arduino software IDE 1.8.2 (new)
@ЮраЕврещенко6 жыл бұрын
Thank you!!
@chrisstromberg65275 жыл бұрын
That is really cool!
@RăzvanMarinescu-i9z7 ай бұрын
DELETE PROGRAM ATTINY 85?
@joebro3912 жыл бұрын
Whoa, are you Bear Grylls' brother that DOESN'T go outside?
@MPElectronique8 жыл бұрын
thank you
@EllieMappin7 жыл бұрын
Nice cat eyes.
@umairanwar86097 жыл бұрын
Love u ... this worked
@planker2 жыл бұрын
thanks
@t1d100 Жыл бұрын
Great!
@mohammedzaman19375 жыл бұрын
i am getting this: avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature.
@DavidWatts5 жыл бұрын
It sounds like you need to burn the bootloader to set the fuses.
@mohammedzaman19375 жыл бұрын
use the same process to burn the bootloader?
@mohammedzaman19375 жыл бұрын
Arduino: 1.8.9 (Windows 7), Board: "ATtiny45/85 (Optiboot), Disabled, CPU, ATtiny85, 8 MHz (internal), EEPROM retained, B.O.D. Disabled" Build options changed, rebuilding all Sketch uses 910 bytes (11%) of program storage space. Maximum is 7616 bytes. Global variables use 11 bytes (2%) of dynamic memory, leaving 501 bytes for local variables. Maximum is 512 bytes. avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check. An error occurred while uploading the sketch This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
@DavidWatts5 жыл бұрын
@@mohammedzaman1937 Just checking, are you clicking Sketch -> Upload using programmer? My other suggestion (assuming you are using a board as a programmer) is to upload the Arduino ISP sketch to it again with the ATTiny disconnected.
@sasoyu89225 жыл бұрын
Me too, any updates?
@SpeccyMan8 жыл бұрын
I bought this neat little Arduino Uno shield from a chap in Greece. www.ebay.co.uk/itm/221324819158 It simplifies this whole process immensely and it comes with a free ATtiny85 and a few components for a small demo project.
@DavidWatts8 жыл бұрын
I like the Elite Proto Shield for that kzbin.info/www/bejne/bWbboKagiJ2gZpY
@alostafawzi8 жыл бұрын
thanks it is useful site
@matthijsjanse32758 жыл бұрын
why are your puils all wierd
@DavidWatts8 жыл бұрын
+matthijs janse Pupils?
@matthijsjanse32758 жыл бұрын
In the intro
@DavidWatts8 жыл бұрын
+matthijs janse Probably just light from the windows, I used to live in a converted factory and the windows were massive.
@matthijsjanse32758 жыл бұрын
o ok
@bluetorch138 жыл бұрын
+David Watts oh, I see know, they look like a cat's pupil, awesome. LOL
@oird83812 жыл бұрын
that was easy
@lavrenti839310 жыл бұрын
Do you smoke weed ? Haha :D
@DavidWatts10 жыл бұрын
Ha ha, I was perhaps slightly hungover. Bank holiday weekend 'n all.
@HOTRODLED5 жыл бұрын
can this be hooked up to a small led addressable ring?
@ddjazz5 жыл бұрын
You can use a neopixel ring and use adafruit neopixel library that runs on the attiny85