Control the servo motor's direction with analog stick

hi everyone,
for general understanding and arduino learning I thought of a project with three modules - analog stick, servo motor and ulatrasonic sensor. I want to make the servo motor with single sided piece and ultrasonic sensor attached look at the direction of the analog stick. Basically, if you push the stick right, the servo motor turns and the ultrasonic looks at right.
If you have any suggestions, please let me know. I thought of map(), but I'm not really that experienced and mostly rely on self learning :slight_smile:

Do not double post.