setMotorTurnAdj(id, speed,time)
Set the motor to rotate at constant speed (non-blocking)
Parameter
Parameters
Type
Description
id
unsigned char
ID number to be controlled, range 0 ~ 18
speed
int
Set motor rotation speed. Positive numbers indicate clockwise rotation, negative numbers indicate counterclockwise rotation, unit: r/ min, range: -140 ~ 140
time
int
Set the rotation time: unit: 1ms, when the motor rotates for the specified time, the motor automatically stops rotating, 0xFFFF means that it will always rotate
Example
Use uKit Explore v2 board to control the DC Motor ID-1 to rotate counterclockwise all the time at the speed of 80.
Use the uKit Explore v2 board to control the DC Motor ID-1 to rotate counterclockwise all the time with the speed slowly increases from 0 to the maximum speed.
Last updated
Was this helpful?