Control

These functions provide motor control without using effects from Feelix and are based on the SimpleFOC library. Visit simplefoc.com for more details.

Functions and Parameters

Move Motor

  • In torque mode MotionControlType::torque the targetValue sets the voltage.

  • In angle mode MotionControlType::angle the targetValue sets the target position (radians).

  • In velocity mode MotionControlType::velocity the targetValue sets the target speed (rad/s).

feelix.move_feelix(float targetValue, MotionControlType controlType);

Disable driver

feelix.disable();

Enable driver

feelix.enable(); // enabled by default in feelix.init();

Set rotation range

void setRange(float rangeMin, float rangeMax, bool updateStartPos = true);
  • rangeMin – start position in degrees (default: 0)

  • rangeMax – end position in degrees (default: 360)

  • updateStartPos (optional) – set current position to zero (default: true)

Constrain range within which effects can be played

Set voltage limit

Set velocity limit

Motor Control Parameters

PID controller settings (more information)

Angle PID

Velocity PID

Variables

Variables updated in feelix.run()

Status

Transmission Factor

Setting this factor lets you account for gear ratios so motion is calculated at the output shaft rather than just at the motor.

transmission factor = (teeth of driven gear) ÷ (teeth of driving gear)

Last updated

Was this helpful?