Pages: [1]   Go Down
Author Topic: 'OUTPUT' was not declared in this scope  (Read 507 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I am so new to this that this is my 1st project and I have fallen at the first hurdle!!
Tried to run a simple tut from “High – Low Tech” running an Arduino board as ATtiny programmer with an Attiny85, but I get the attached error when I tried to test it with the “Blink” example.


Can anybody tell me where I’m going wrong?
Regards,


* Attiny85 blink problem.jpg (160.61 KB, 701x725 - viewed 22 times.)

* Attiny85 blink problem.jpg (160.61 KB, 701x725 - viewed 13 times.)
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 58
Posts: 4031
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To put code in a post, click the # button above the edit window and then paste the coe you copied from the IDE inside the code /code tags. Yes, I had to leave the brackets out but you leave them in.

Logged

Examples can be found in your IDE.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I am so new to this that this is my 1st project and I have fallen at the first hurdle!!
Tried to run a simple tut from “High – Low Tech” running an Arduino board as ATtiny programmer with an Attiny85, but I get the attached error when I tried to test it with the “Blink” example.


Can anybody tell me where I’m going wrong?
Regards,

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
 
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);    
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

I changed the "int led = 13" to "int led = 3" for the output as the attiny85 only has 8 pins.
« Last Edit: January 26, 2013, 07:27:30 pm by Lowarse » Logged

Temple, Texas
Offline Offline
Sr. Member
****
Karma: 14
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I am so new to this that this is my 1st project and I have fallen at the first hurdle!!

Not sure what you mean exactly by "new to this" and "1st project" , but...

Have you tried running blink on the Arduino (forget the Attiny for the moment).  Board type "Arduino Uno" (or whatever your Arduino board actually is)
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 58
Posts: 4031
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now try the # button to add those CODE TAGS. Put the code between the CODE TAGS.
The # button is right above the smileys, but you have to look.

Logged

Examples can be found in your IDE.

Offline Offline
Sr. Member
****
Karma: 0
Posts: 252
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried your code with the "attiny85 w/ arduino as ISP" and it complied fine using v22.

I wonder if you installed the Attiny files correctly.
Logged

Pages: [1]   Go Up
Jump to: