ESP32 Joystick Pan-Tilt Control | ADC Inputs & PCA9685 Servos
A joystick supplies two analog commands for pan and tilt. The ESP32 reads each axis and sends the corresponding servo pulse settings to a PCA9685 over I²C.
The key idea
Measured joystick centres and endpoints help map each input into a usable command range. The servo pulse range should also fit the mechanism’s travel so a full joystick command does not drive it against a stop.
What to remember
- Calibrate each input axis separately.
- Limit each servo command to its mechanism’s useful range.
Check your understanding
Why can a servo move slightly with a joystick held at its centre?
Show the explanation
Noise or centre offset can vary the command, which a calibrated deadband can suppress.