Attiny 85 problem

I tried uploading a sketch to my attiny 85, i uploaded the arduino isp sketch to the arduino, selected my attiny, i followed all the steps but it still came up with these error messages:

C:\Program Files (x86)\Arduino\libraries\Servo\Servo.cpp: In function ‘void __vector_3()’:
C:\Program Files (x86)\Arduino\libraries\Servo\Servo.cpp:105: error: cannot convert ‘volatile uint8_t*’ to ‘volatile uint16_t*’ for argument ‘2’ to ‘void handle_interrupts(timer16_Sequence_t, volatile uint16_t*, volatile uint16_t*)’
C:\Program Files (x86)\Arduino\libraries\Servo\Servo.cpp: In function ‘void initISR(timer16_Sequence_t)’:
C:\Program Files (x86)\Arduino\libraries\Servo\Servo.cpp:151: error: ‘TCCR1A’ was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\Servo\Servo.cpp:152: error: ‘TCCR1B’ was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\Servo\Servo.cpp:159: error: ‘TIFR1’ was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\Servo\Servo.cpp:160: error: ‘TIMSK1’ was not declared in this scope

My sketch was 3,134 bytes which i’m fairly sure does not exeed the limit bit i’m not sure.

#include <Servo.h>

const int threshold = 21;
const int pingPin = 3;
Servo leftmotor;
Servo rightmotor;
int pwmL,pwmR;

void setup() {

  leftmotor.attach(9); 
  rightmotor.attach(10); 
}

void loop()
{
 
  long duration, cm;


  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);


  pinMode(pingPin, INPUT);
  duration = pulseIn(pingPin, HIGH);



  cm = microsecondsToCentimeters(duration);
  
if(cm < threshold){
  leftmotor.write(pwmL -180);
  rightmotor.write(pwmR +180);
  delay(500);
  leftmotor.write(pwmL +180);
  rightmotor.write(pwmR +180);
  delay(1000);
}else{
  leftmotor.write(pwmL +180); 
  rightmotor.write(pwmR -180);
}
  
  
  
 
delay(100);
}
long microsecondsToCentimeters(long microseconds)
{
  return microseconds / 29 / 2;
}

Give this servo library a try... http://www.cunningturtle.com/servo8bit-library-version-0-6-released/

How do i download libraries to the attiny? Or do i just download it to the arduino?

You'll find that a lot of the "standard" libraries don't work on a Tiny85.

but how do i upload the library to the attiny?

In your sketch, change this…

#include <Servo.h>

…to this…

#include <Servo8Bit.h>

…then resolve any errors.

thank you

I had trouble compiling the library could some one please help, whenever I try to access the folder via the cmd window it always says that what ever i put in is not recognized as an internal or external command, operable program, or batch file.

isaac868: I had trouble compiling the library...

You don't need to compile it. The IDE will do that for you. You just have to make certain you installed the library in the correct location and then (re)start the IDE.

the link in the above comment said it needed to be compiled. When i didnt "compile" it and just put the folder in the arduino libraries folder, it did not reconize it as a library.

...just put the folder in the arduino libraries folder, it did not reconize it as a library.

You did not put it in the correct place. Or, you did not restart the IDE. Instructions for installing libraries... http://arduino.cc/en/Guide/Libraries

If you realy cant get anywhere with it Arduino 1.0.5 will install it for you.