Hi,
Use writeMircoseconds instead of write, try a range from -
writeMicroseconds(MIN_PULSE_WIDTH);
to
writeMicroseconds(MAX_PULSE_WIDTH);
This is the maximum range defined by the servo library in Servo.h
It might be larger that your servo can manage over the long term, so if it gives you more range than you need, create your own MAX and MIN to limit the servo to the range you need.
The values of MIN_PULSE_WIDTH and MAX_PULSE_WIDTH as defined in servo.h are
#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo
#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo
You can define your own limits to be within this range in your sketch, for example
#define MY_MIN_PULSE_WIDTH 800 // the shortest pulse I will use
#define MY_MAX_PULSE_WIDTH 2200 // the longest pulse I will use
Duane B
rcarduino.blogspot.com