Servo sample code for V5

Hi everyone! My team is new to robotics and we are figuring out the programming rn. We use servos for some of our parts but I haven’t found any example codes or tutorial for servo on V5, Could anyone help me out with a sample code or give any direction? Both text and blocks are fine. Our goal is to make a gate that opens & closes at around 90degrees (sketch below). Thank you!

55%20AM

there should be no servos in v5. all are motors with integrated encoders.
you should do something like this:

motor move [speed]
while(1){
if (motor position >= [target position]){
motor move 0
break
}
}

keep in mind that the position returned will be in ticks, and there are 900 ticks in a full rotation. note that the commands in the above code is just simple descriptions not the real ones in vexCode.

Servo motors are usually ones that can only rotate a certain amount of degrees. Mostly 180. They are often used on RC cars for steering.