Skip to content

Commit 7f9c45f

Browse files
authored
Implement torque control in loop function
Added torque control call to motor loop in the main loop.
1 parent 26dc6e8 commit 7f9c45f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

examples/motion_control/open_loop_motor_control/open_loop_position_example/open_loop_position_example.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ void setup() {
7171
}
7272

7373
void loop() {
74+
//torque control
75+
// should be called as frequently as possible
76+
motor.loopFOC();
7477
// open loop angle movements
7578
// using motor.voltage_limit and motor.velocity_limit
7679
// angles can be positive or negative, negative angles correspond to opposite motor direction

0 commit comments

Comments
 (0)