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?
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)
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...
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.
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.
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.
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.
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"
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 ?)