I think before you worry about the code you need to get the motor to controller to Arduino defined.
For instance, Why wouldn't you use the 30 RPM motor instead of the 60 RPM?
The motor has an encoder, you can use it to count the motor rpm (or shaft, not sure which.
I look at this motor because I know they can work with Arduino
I pick the 30 RPM for the torque, as I want the motor to be able to resist winds for exemple. As for the shaft, it can easly connect to my solar panel structure.
I did not order the motor yet so I'm open for recommandation.
I need a motor that can have enough torque to resist winds and old the aluminium rotating structure that will build to old the 2 solar panel. Overall the structure with the panel will weight about 30 to 40 kg.
The 5204 is NOT a servo motor but does have an encoder, so you will need to connecto to it
You can only control the speed and direction with that controller.
You use the encoder to know how far you have moved
Any motor will work with Arduino, if you have the correct motor driver.
To steer your installation, you need to estimate the amount of torque required, and order a gear motor capable of delivering at least twice that torque. Worm gears cannot be driven backward and help resist wind pressure.