Function rc_motor_set#
Defined in File motor.h
Function Documentation#
-
int rc_motor_set(int ch, double duty)#
Sets the bidirectional duty cycle (power) to a single motor or all motors if 0 is provided as a channel.
- Parameters:
ch – [in] The motor channel (1-4) or 0 for all channels.
duty – [in] Duty cycle, -1.0 for full reverse, 1.0 for full forward
- Returns:
0 on success, -1 on failure