Skip to main content
ServoToolkit from @agentium/edge drives a configured GPIO signal using software PWM. It exposes angle and sweep tools for hobby servos.

Configure a servo

The factory below creates tools without moving hardware. Supply the GPIO chip, signal pin, and pulse range appropriate to your board and servo:
Pass the returned tools to an Agent’s tools option. GPIO access starts when a tool executes; the host needs permission to use the selected GPIO chip.

Available tools

Results are JSON strings with operation details or an error field. A tool error does not establish the actuator’s current position. Successful pulses end by setting the line low and releasing it; the toolkit does not continuously hold position after the requested duration.

Timing and host controls

PWM uses Node.js timers. Scheduling delays affect pulse accuracy; this is not a hardware PWM or real-time motion controller. Match pulse limits to the actuator and constrain duration and motion ranges in your host tool wrapper before exposing it to a model. The implementation does not provide a cancellable motion session or a guarantee that cancelling an Agent run stops a pulse already in progress. For general digital I/O, use GpioToolkit. For device monitoring, use SystemToolkit.