Controlling speed and direction of 360 continuous 5v servo

Hello, I'm totally new to writing programs. However I used arduino nano for programming with rc uavs, so I know how to connect it and upload sketch.
I tried to find instructions, more detailed info how can I make this possible, but couldn't find anything, probably because english is not my native language and I might be using wrong phrases.
I have 1 metal geared servo, which has been modified so it can turn continuously 360 degree both ways, the resistance of potentiometer inside the servo doesn't change. I want to use arduino nano (small size matters) and preferably potentiometer to precisely control rotational speed. It's more about slow rotation, as this will be geared with telescope focuser, so focus can be adjusted without touching telescope at all.
Alternative option would be to use 2 tactile button switches, each for opposite direction, with posibility of adjusting rotational speed (doesn't have to be adjusted "live", could be param in sketch, so when I find correct speed by updating adjusted sketch, I'll leave it that way).
But I'd prefer option with potentiometer in first place, as winding focuser tube from its closed position to the point where it starts focusing would take forever with very slow speed.

Any help would be much appreciated.
Thank you

So write a sketch to move the servo. :slight_smile:
If you write a value for the middle of the range, 90 if you are using servo.Write or 1500 if using servo.writeMicroseconds, the servo should stop.
The exact value might be different from servo to servo so experiment and see.

A note on speed control - there might not be any. Servos are positionally aware devices whose job it is to move to a commanded position as quickly as possible and stay there. When you modify them (or buy ones pre-modified) they still use electronics designed for positional control, not speed control.
Different servos have different electronics, and some give reasonable speed control when modified. Others do not.

The Knob example in the Servo library examples uses a potentiometer to adjust the servo angle. It could just as well control the speed and direction of a continuous servo (if the speed is controllable).

I found something like this (potentiometer 10k according to schematic), would this work?

*/
#include <Servo.h>
int t=10;
Servo SR04; // Full rotational
int PinReading=0;
int potentiometer=0;
void setup() {
// put your setup code here, to run once:
SR04.attach(9);// servo connected to D9
pinMode(A0,INPUT);
}

void loop() {
// put your main code here, to run repeatedly:
PinReading=analogRead(A0);
delay(t);
potentiometer=map(PinReading,0,1023,0,180);
potentiometer=constrain(potentiometer,0,180);
SR04.write(potentiometer);
delay(50);

}

Edit: it says that pot at 95 degrees position is neutral. 0-94 left, 96-180 right.

Just realised I can control 360 servo rotation and speed with simple servo tester. Please feel free to delete this thread. Thank you