Main Content

Motor Carrier

Control motors connected to Motor Carrier

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

Functions

expand all

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

Topics