HS-311 Servo always turns to far left

I recently bought a pair of Hitec HS-311 servos for a project I’m working on, and am currently working on being able to control them effectively using a raspberry pi. Following instructions I found here, no matter what value I used the servo always turned to the far left. When that didn’t work, I used the unchanged sweep example code on an arduino, which had the same results. I’ve tried powering the servos with both three and four AA batteries, with the same results.

Any advice?

It’s a question of the signal / code / programming. If the servo turns too far left and stays there, the signal (PWM ideally) is below 500us.
An RC servo needs to receive a repeated 5V signal (PWM) of between 500 and 2500us, followed by a delay (0V) of ~20-30ms, then repeat.
You need to understand what signal is actually being sent to the servo, that it falls within the range above and is repeated.