MKR Motor Carrier

Control motors connected to MKR Motor Carrier

You can control servo, DC motors M1 and M2 in closed loop control using two encoder inputs the on the MKR Motor Carrier. Create arduino object before using the MKR Motor Carrier functions. See Connect to Arduino Hardware for more information.

Functions

expand all

mkrMotorCarrierConnection to Arduino MKR Motor Carrier
dcmotorConnection to DC Motor on Arduino MKR Motor Carrier
startStart DC motor connected to MKR Motor Carrier
stopStop DC motor connected to MKR Motor Carrier on Arduino hardware
servoConnection to servo motor on Arduino MKR Motor Carrier
writePositionWrite position of servo motor connected to MKR Motor Carrier
rotaryEncoderConnection to rotary encoder on Arduino MKR Motor Carrier
resetCountSet encoder count value to zero or specified value
readSpeedRead current rotational speed of motor from rotary encoder
readCountRead current count value from encoder connected to MKR Motor Carrier
pidMotorConnection to motors in closed-loop PID control on Arduino MKR Motor Carrier
writeSpeedWrite speed of PID motor
writeAngularPositionRotate DC motor by specified angle in closed loop position control
readSpeedRead current rotational speed of DC Motor in closed loop control from encoder connected to MKR Motor Carrier
readAngularPositionRead angular position of DC Motor in closed-loop control from rotary encoder