1. Connect a common ground
Connect the external 5 V supply ground to both the servo ground and a Pico GND pin. A common reference is required for the control pulse.
2. Wire power and signal
Connect servo power to regulated 5 V and its signal wire to GP16. Check the servo manufacturer’s wire colors before applying power.
3. Upload the sweep program
Run the code with the servo horn unobstructed. It should move through 0, 90, 180, and back to 90 degrees.
4. Calibrate safe limits
If the servo strains near either end, narrow the pulse range in set_angle until motion is smooth and quiet.