I have created a project with my Arduino Uno that reads the input from an IR remote and then switches on my LED for 3 seconds and switches it off again, I then went on to use this idea to open my bedroom door with a remote. It worked fine but I now want to make it permanent using an attiny85 chip so I dont have to glue my arduino next to my door.
I am new to Arduino, literally 2 weeks so I was proud of myself for pulling this off.
I have recently bought an attiny85 chip and have no idea how to get my sketch to work from the attiny85 so I no longer need to use the Arduino Uno.
I don't think it is too difficult a project but because I am new to this I do not know how to go about it.
I have setup the attiny85 files in my arduino program and everything shows. The problem now is how to code it and upload the sketch to the chip
I am totally clueless as to how to go about this
You need to flash the code on the Tiny85 using SPI with your Uno as programmer. The actual physical DIP pin numbers on the Tiny are different than the logical pin numbers you use in programming the chip, as you probably already know. I will use the logical pin numbers here. You probably have a pinout diagram of the Tiny85 to determine which physical pins to connect.
Tiny 2 (physical pin 7) to Uno 13 (SCK)
Tiny 1 (physical pin 6) to Uno 12 (MISO)
Tiny 0 (physical pin 5) to Uno 11 (MOSI)
Tiny Reset (physical pin 1) to Uno 10 (SS)
Connect Vcc (to Tiny physical pin 8 ) and Gnd (to Tiny physical pin 4)
upload the ArduinoISP sketch onto the Uno (probably in File | Examples)
Put a capacitor between Uno reset and Gnd. I use 10uf but you can use less.
You can now close the ArduinoISP sketch and get your Tiny85 code into the IDE.
Put an led in series with a current limiting resistor between Uno pin 9 and Gnd (this led is a Heartbeat signal that confirms ArduinoISP sketch is running)
Select Tiny85 from Tools | Board menu
Select Arduino as ISP from the Tools | Programmer menu
Select "Upload using Programmer" from the Files menu. (do not use "Upload")
That is all there is to it...
As long as you leave that capacitor on the Uno between reset and ground, it is acting like a programmer, not a Uno. Any new sketch will not upload to the Uno, it will upload to the Tiny85. You can modify your Tiny85 code and "Upload using programmer" over and over until you get rid of any compiler errors and/or get the Tiny85 to run the way you want.