Linear Servo Help

I have a nice code that I found that works a standard servo one button 90 clockwise other button 90 anti clockwise.
Question as I have no room for a micro servo will a linear servo work the same ?

// We include the libraries.
#include <Servo.h> // Library for Servo commands. The library is present in the latest versions of the Arduino IDE.

// We declare the constants and variables.
Servo myservo; // We set the servomotor with the name myservo.
int Button_Sx; // We declare the variable for checking the state of the left button or anticlockwise movement.
int Button_Dx; // We declare the variable for checking the state of the right button or clockwise movement.
int Servo_Position = 0; // We assign the value of the servo starting position.

void setup () {
myservo.attach (3); // We set pin 3 as the pwm pin for controlling the servomotor.
pinMode (4, INPUT); // We set pin 4 connected to the left button as input.
pinMode (5, INPUT); // We set pin 5 connected to the right button as input.
myservo.write (Servo_Position); // Position the servomotor at every start in position 0.
}
// The program repeats itself in an infinite loop.
void loop () {
Button_Sx = digitalRead (4); // Reads the logical value of pin 4 and assigns this value to the variable of the state of the left button.
Button_Dx = digitalRead (5); // Reads the logical value of pin 5 and assigns this value to the variable of the status of the right button.
// Check that the buttons are not in the same logical state. (Executes the increment instructions if only one button is pressed).
if (Button_Sx! = Button_Dx) {
if (Button_Sx == HIGH) {
Servo_Position = --Servo_Position; // Decrements the value of the variable.
}
if (Button_Dx == HIGH) {
Servo_Position = ++ Servo_Position; // Increase the value of the variable.
}
myservo.write (Servo_Position); // Move the servomotor to the position corresponding to the value of the variable.
delay (10); // Delay in milliseconds to stabilize the system.
}
}

Linear servo .......

https://www.ebay.co.uk/itm/AGF-1-5g-Ultra-Micro-Plastic-Gear-Digital-Coreless-Liner-Servo-For-RC-Plane-Toy/392704514358?ssPageName=STRK%3AMEBIDX%3AIT&var=661611564780&_trksid=p2057872.m2749.l2649

Question as I have no room for a micro servo will a linear servo work the same ?

Yes.

Should work the same as a standard servo.
Just be aware the output power is only around 1/10 of say an sg90 micro servo.

Thank you all so much that's put my mind at rest. I had not thought about the power side but it's not a massive weight it needs to move. :slight_smile:

As A total newbie it frightens me for "braking" bits and the wasted cost as for all it's even tighter know.

Gives me faith to ask a question about another part of the suzzle .....