An ESP32-based project to control a servo motor with smooth, randomized movements. Designed for physical interaction simulation or anti-idling purposes.
- Precise PWM Control: Uses microsecond pulse widths for fine-tuned servo travel.
-
Smooth Easing: Implements a Smoothstep algorithm (
$3t^2 - 2t^3$ ) for fluid, lifelike motion. - Continuous Randomness: Moves directly between random positions in a configurable range.
- Plotter Support: Streams numeric pulse data compatible with the Arduino Serial Plotter.
- Target: ESP32 (e.g., NodeMCU, DevKit).
- Pinout: Signal connected to D18.
- Driver: Requires Silicon Labs CP210x USB to UART Bridge drivers on Windows.
At the top of main/main.ino, you can adjust the following:
minPulse: Minimum pulse width (default 1000us).maxPulse: Maximum pulse width (default 1800us).minWait: Minimum wait time (default 8000ms).maxWait: Maximum wait time (default 25000ms).moveDuration: Duration of each transition (default 2000ms).
- Open the project in the Arduino IDE.
- Install the
ESP32Servolibrary. - Select your ESP32 board and COM port.
- Upload and monitor via the Serial Plotter (115200 baud).