// ATtiny25/45/85
// +-\/-+
// RESET 1| |8 VCC
// 3/A3 2| |7 2/A1
// 4/A2 3| |6 1
// GND 4| |5 0
// +----+
#include "servo2.h"
tservo myservo(PB3); // create servo object to control a servo
int add = 2;
void setup()
{
/*
myservo2.attach(7);
servo1.attach(5);
servo2.attach(6);
// attaches the servo on PB1 to the servo object
*/
}
void loop()
{
//myservo.write(90);
myservo=(unsigned)myservo + (unsigned)add;
delay(25);
if((unsigned)myservo <= 0 || (unsigned)myservo >= 180) {
add = -add;
}
}