Hey, I was trying to programme Attiny85 with mine arduino v3.0, and when i try to test code or upload it to attiny85 i always get error ""serial" was not declared in the scope". Maybe there is some way to fix this or other way to upload this code into attiny85? Please help. Here is code:
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{ pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop()
{
if (irrecv.decode(&results)) {
if (results.value==0x086){digitalWrite(12, HIGH); delay(1000);}
if (results.value==0x481){digitalWrite(13, HIGH); delay(1000);}
if (results.value==0x886){digitalWrite(12, LOW); delay(1000);}
if (results.value==0xC81){digitalWrite(13, LOW); delay(1000);}
irrecv.resume();
}
}
and error is looks like this :
'Serial' was not declared in the scope
IRrecvDemo_Bulb.ino: In function 'void setup()':
IRrecvDemo_Bulb:12: error: 'Serial' was not declared in this scope
Moderator edit:
[code] [/code] tags added.