You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be an issue witihin the library for values of min and max in the attach(pin, min, max) function.
I am using an official Arduino Uno R3 and IDE version 1.8.19, Servo library version 1.1.8.
I am reading values back using the readMicrosecond function through Serial.
When using the overloaded attach function, min values above 1059 and max values below about 1900 do not work. Instead the library acts as no limits, my serial prints even reach up to 2800 microseconds. Please see details below:
Smallest microsecond range (works perfectly):
int min = 1059;
int max = 1900;
Servo2.write(0);
Serial.println(Servo2.attach(servo2Pin, min, max));
tftText("Servo 2");
'Unlimited' range after higher min:
int min = 1060
int max = 1900;
Servo2.write(0);
Serial.println(Servo2.attach(servo2Pin, min, max));
tftText("Servo 2");
'Unlimited' range after higher max:
int min = 1060
int max = 1850;
Servo2.write(0);
Serial.println(Servo2.attach(servo2Pin, min, max));
tftText("Servo 2");
Higher range reaches up to about 2865:
Edit 23:40 18/07/2022: Wrong value for max, fixed now.
The text was updated successfully, but these errors were encountered:
There seems to be an issue witihin the library for values of min and max in the attach(pin, min, max) function.
I am using an official Arduino Uno R3 and IDE version 1.8.19, Servo library version 1.1.8.
I am reading values back using the readMicrosecond function through Serial.
When using the overloaded attach function, min values above 1059 and max values below about 1900 do not work. Instead the library acts as no limits, my serial prints even reach up to 2800 microseconds. Please see details below:
Smallest microsecond range (works perfectly):
'Unlimited' range after higher min:
'Unlimited' range after higher max:
Higher range reaches up to about 2865:
Edit 23:40 18/07/2022: Wrong value for max, fixed now.
The text was updated successfully, but these errors were encountered: