Skip to content

Commit 26dc6e8

Browse files
authored
Integrate torque control into motor loop
Added torque control call to motor loop in the main loop.
1 parent 222e547 commit 26dc6e8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

examples/motion_control/open_loop_motor_control/open_loop_velocity_example/open_loop_velocity_example.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ void setup() {
6868
}
6969

7070
void loop() {
71-
71+
72+
//torque control
73+
// should be called as frequently as possible
74+
motor.loopFOC();
7275
// open loop velocity movement
7376
// using motor.voltage_limit and motor.velocity_limit
7477
// to turn the motor "backwards", just set a negative target_velocity

0 commit comments

Comments
 (0)