Click or drag to resize

libspiagentspiagent_motor_configure Method

Configure a pair of GPIO pins for an H-Bridge DC motor driver.

Namespace: IO.Bindings
Assembly: libsimpleio (in libsimpleio.dll) Version: 2.2026.331.1
Syntax
C#
public static void spiagent_motor_configure(
	uint pwmpin,
	uint dirpin,
	out int error
)

Parameters

pwmpin  UInt32
Speed PWM output pin number.
dirpin  UInt32
Direction GPIO output pin number.
error  Int32
Set to 0 upon success, or an errno error number upon failure.
Remarks

All PWM outputs share the same pulse frequency.

You must set the common PWM pulse output frequency with a call to spiagent_pwm_set_frequency()before configuring an H-Bridge DC motor driver.

Certain motor driver modules such as the Cytron MD13s can driven by GPIO direction and PWM speed signals. Most will require some form of motor driver signal transcoding such as the MUNTS-0005 PWM Isolator/Encoder module.

See Also