2

I'm trying to follow this this tutorial to program an ATtiny85 micro-controller using my Arduino Uno r3 as the ISP.

I am up to the final step on the tutorial, but get an error when attempting to compile my sketch:

'OUTPUT' was not declared in this scope

I have tried multiple "Blink" scripts, but none have seemed to work.

My full error log:

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

I have also tried including Arduino.h, no help, and changing "OUTPUT" to "0x01", as it is defined to said value in Arduino.h, but instead got this error:

error: 'pinMode' was not declared in this scope

Any ideas as to what is happening?

asked Aug 6, 2014 at 9:13
6
  • 1
    If you change the board back to Arduino UNO does it compile? Could you turn on verbose mode for compilation and post the text that appears when you compile. Commented Aug 6, 2014 at 12:02
  • 1
    It looks like the Arduino core libraries aren't being included... Commented Aug 6, 2014 at 13:05
  • 1
    Are you using the latest version of the Arduino IDE? Seems similar to (this problem](forum.arduino.cc/index.php?topic=82220.0), but in reverse. Commented Aug 6, 2014 at 14:52
  • The first issue, the 'missing' .h file, creates the others. Fix the INCLUDE path and the other errors will go away. Commented Jan 11, 2015 at 15:36
  • Check this thread arduino.stackexchange.com/questions/3642/… Commented Jan 24, 2015 at 21:09

2 Answers 2

3

Create an Arduino.h in ...\Arduino\hardware\attiny45_85\cores\attiny45_85 containing

#include <WProgram.h>

From here https://electronics.stackexchange.com/questions/87328/arduino-as-isp-for-attiny

answered Jan 24, 2015 at 23:14
1

Try moving the "Cores" folder from the avi directory to the attiny director. The path was wrong for me and I was getting the same error. Had the same issue with the bootloader file. Moved it out of the avi folder as well and all worked ok then.

answered Dec 12, 2014 at 7:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.