Serial Communication with AVR Pocket Programmer and ATtiny85

Hello,

I am using an AVR Pocket Programmer to program an ATtiny85. I am able to successfully upload code to the microcontroller, but I am experiencing difficulty with serial communication. I keep getting the error "Serial was not declared in this scope". I have tried following numerous tutorials, but can't seem to find the solution. I am trying to read the analog output from a light sensor, thanks for your help!

Here is my code:

int led0 = 0;
int led1 = 1;
int led2 = 2;
int lightPin = A3;
int lightReading;

void setup(void) {
Serial.begin(9600);
pinMode(led0, OUTPUT);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(lightPin, INPUT);

}

void loop(void) {
lightReading = analogRead(lightPin);
Serial.print("Analog reading = ");
Serial.println(lightReading);
digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(1, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(0, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(1, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(2, LOW); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
}

There is no hardware serial support on the 85.

You need to use software serial. Note that it can be flaky.

The tiny x41 and 1634 have two serials, and the 828, x313 and x7 (as well as almost all megas, many of which have more than one) have hardware serial. (See links in my sig for cores)

If you use this tiny-core:
https://code.google.com/p/arduino-tiny/

You can use Serial as you do in your sketch. The core includes TinyDebugSerial which is output only.
The output pin is pin 3, and you will need a usb/serial converter (you can use an Arduino for this)

More about the possibilies

Tiny communication