Problem programming ATtiny85

I am at my wits end trying to program an ATtiny85 using an Uno. I have followed the instructions on every YouTube video and the MIT website, I have tried using every version of Arduino (1.0.1, 1.0.4 & 1.0.5-r2) and have gone so far as upgrading my operating system from Windows XP to Windows 7, but I get to the same point where I download 'Blink.ino' and get the following error message:

Blink.cpp:10:21: error: Arduino.h: No such file or directory
Blink.cpp: In function 'void setup()':
Blink:14: error: 'OUTPUT' was not declared in this scope
Blink:14: error: 'pinMode' was not declared in this scope
Blink.cpp: In function 'void loop()':
Blink:19: error: 'HIGH' was not declared in this scope
Blink:19: error: 'digitalWrite' was not declared in this scope
Blink:20: error: 'delay' was not declared in this scope
Blink:21: error: 'LOW' was not declared in this scope

The 'Arduino.h: No such file or directory' message was the only clue I had, so I went looking for it, but could not find it online anywhere, not even here at Arduino.cc. Can anyone help me?

where are you getting the attiny definition files from for the IDE

is the ATtiny listed as a board in the IDE ?

I Presume you have followed this link through ?

Cheers Pete.

I'll be trying exactly the same exercise tomorrow so we'll compare notes after that.

Try the attached sketch.
Post a schematic of your UNO-ATtiny85 wiring connections.
Did you load ArduinoISP in the UNO first ?
Post your Boards.txt file you are using and a screenshot of where that file is. (If you think it is in C:\Program Files (x86) then that's your problem).
Post a screenshot of the IDE after first selecting "Files\Preferences".
Which ATtiny85 are you trying to program ?
What did you select in the IDE for "Board" ?

(PS-I never say "Cheers " to anyone who is at their wit's end)

Blink_85.ino (751 Bytes)

mlockett216:
I am at my wits end trying to program an ATtiny85 using an Uno. I have followed the instructions on every YouTube video and the MIT website, I have tried using every version of Arduino (1.0.1, 1.0.4 & 1.0.5-r2) and have gone so far as upgrading my operating system from Windows XP to Windows 7, but I get to the same point where I download 'Blink.ino' and get the following error
The 'Arduino.h: No such file or directory' message was the only clue I had, so I went looking for it, but could not find it online anywhere, not even here at Arduino.cc. Can anyone help me?

".h" is a library extension.. Latest IDE version is 1.5.5...

Have you look at this Instructable?

raschemmel:
(PS-I never say "Cheers " to anyone who is at their wit's end)

I say "Cheers" to Every one no matter what end they are at :slight_smile:

Cheers Pete.

That's a good Instructable. I had loads of working ATtiny85s but I still thought it was useful.
Good link. Thanks

raschemmel:
That's a good Instructable.

Two respondents in this thread advocate the use of series resistors in the programming side, which strikes me as prudent.

I'll be trying that later today.

To the OP. A google search of your term "Arduino.h: No such file or directory" throws up many examples of others who have experienced this. Most that I see have resolved the issue by using the Arduino-Tiny core (link to project and download) rather than the MIT one. I did try the MIT one early on, but have used this Arduino-Tiny mostly.

As for the choice of using current-limiting resistors for your programming, that's a sensible thing I guess but I've never bothered. I made up a shield for programming ATTiny and the only resistors there are for the LEDs. But I digress - the resistors are a red herring and will not assist in solving your present situation. The errors you're presenting are occuring at the compilation step for the sketch before any attempt to upload it to your ATTiny via the Uno. What it tells you is you need to sort out your ATTiny core setup in the IDE first so that pressing the verify button on the IDE results in an error-free compilation. Once you can get that, the next step will be the programming - which I expect you'll find will be trouble free.

Cheers ! Geoff

I get the exact same arduino.h problerm as the OP. I have to attend to my domestic job-jar right now, so I'll try the linked Arduino Tiny one later on.

@strykeroz... I unzip "arduino-tiny-0150-0020.zip" into the sketchbook > Hardware folder I guess?

(Which I did but I don't see the board in the IDE list. The other file- the one that didn't work- has a boards.txt file which seems to inform the list. I don't see such a file in the one you linked to?)

EDIT.... I renamed Prospective Boards to Boards and now it lists them... so let's try an upload.

Ok, thanks, that worked using that link above.

There's one small extra step over the Instructable amd that's to remember to choose the Arduino as Programmer. In the Instructable, that's not necessary since the target board already says that the Arduino is the ISP.

I made up a programmer on a mini breadboard stuck onto a prototyping shield, as shown in attached pic. The LEDs at the left are those suggested in the Arduino ISP sketch; the one on the right is on pin0 for the Blink sketch. The programming lines have 330R in series, and note the capacitor.

raschemmel:
That's a good Instructable. I had loads of working ATtiny85s but I still thought it was useful.
Good link. Thanks

which one ?

or

I just got some in. getting ready to find out what is at the end.. of my wits that is.

I hadn't seen the first Instructable when I posted the link to the second one. The first one's actually the better one imo- it's essentially what I did this morning to get it working, although I must prune the boards list as suggested.

JimboZA:
I hadn't seen the first Instructable when I posted the link to the second one. The first one's actually the better one imo- it's essentially what I did this morning to get it working, although I must prune the boards list as suggested.

I went to the link to get the archive

  1. Download the Arduino-Tiny archive (ZIP-file)
    Google Code Archive - Long-term storage for Google Code Project Hosting.

when trying to download, it had a prompt by Google that said the file was depreciated.... offered to let me find a different file.

the other instructables (/Simplest-and-Cheapest-Arduino/) jumped around and skipped some steps. hoping that this one works.

Sorry Dave, slight lie on my part: I actually downloaded the zip from strykeroz' link in reply #9, but followed the steps from the first Instructable. Main thing was the boards.txt file where I just renamed the prospective boards one, and remember in the IDE to go Tools > Programmer > Arduino ISP which the second Instructable didn't need.

Edit: I since edited the boards file to include only the one I need, so IDE the list in Tools > Board isn't too long.

@JimboZA,
I think you got that backwards,
The one you posted in Reply#1 was the first link in your last post, not the second link.
That's the one I was referring to when I said "Good Instructable"

Ok, just to clarify....

The zip I downloaded is this one: Google Code Archive - Long-term storage for Google Code Project Hosting. (Strykeroz' Reply#9)

The instructions I followed, using the above zip though, were: http://www.instructables.com/id/Using-the-Arduino-Uno-to-program-ATTINY84-20PU/ (Bainesbunch's Reply#1). But I also added 330R series resistors in the programming lines, and added signal LEDs as described in the IDE File > Examples > ArduinoISP sketch

Those instructions are better than the ones I previously linked to: http://www.instructables.com/id/Simplest-and-Cheapest-Arduino/ (JimboZA Reply #5).

Sorry for the confoosh.

E&OE. YMMV. Ts & Cs apply. :stuck_out_tongue:

So the bottomline is that to get it to complile without all the errors , use the zip file in the link you posted which contians the proper hardware files and follow the instructions in the same link you posted in Reply#1? You said "it worked", meaning
what ? (No errors , programmed ok, etc) but was it possible to tell what caused the OP's compile errors ? (was the board file the problem ?)