# Possible error in the open loop tutorial code, missing motor.loopFOC()

**URL:** https://community.simplefoc.com/t/possible-error-in-the-open-loop-tutorial-code-missing-motor-loopfoc/8006
**Category:** Site Feedback
**Created:** [February 22, 2026, 2:26am UTC](https://community.simplefoc.com/t/possible-error-in-the-open-loop-tutorial-code-missing-motor-loopfoc/8006 "2026-02-22T02:26:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mortenstreamy](https://community.simplefoc.com/user_avatar/community.simplefoc.com/mortenstreamy/32/9689_2.png) [@mortenstreamy](https://community.simplefoc.com/u/mortenstreamy)
#### Post date: [February 22, 2026, 2:26am UTC](https://community.simplefoc.com/t/possible-error-in-the-open-loop-tutorial-code-missing-motor-loopfoc/8006/1 "2026-02-22T02:26:50Z")

</div>

Hello!

I’m new to simpleFOC and i was following the Getting Started Guide. I sucessfully tested the driver, but when i got to the open loop example (BLDC motor 3PWM), i couldnt get the motor to spin. However when i added the “motor.loopFOC();” to the loop function it worked perfectly. I would like to report this so people can save some time when first starting with SimpleFOC, given that this is an error and i didnt misunderstand anything 🙂

---

<div class="post-metadata">

### Author: ![Antun\_Skuric](https://community.simplefoc.com/user_avatar/community.simplefoc.com/antun_skuric/32/21_2.png) [@Antun\_Skuric](https://community.simplefoc.com/u/Antun_Skuric)
#### Post date: [February 22, 2026, 4:25am UTC](https://community.simplefoc.com/t/possible-error-in-the-open-loop-tutorial-code-missing-motor-loopfoc/8006/2 "2026-02-22T04:25:48Z")

</div>

You’re absolutely right. I’ll update it asap!  
Thanks for pointing this out 🙂

EDIT:  
`motor.loopFOC()` is mandatory for all applications, I juut forgot to update it at a couple of locations.  
The docs should be up to date now.

However, I’ve just noticed that I did not update the openloop examples in the library.  
They are up to date in the master branch. Here is the link for those having issues:

> **[Arduino-FOC/examples/motion\_control/open\_loop\_motor\_control at master ·...](https://github.com/simplefoc/Arduino-FOC/tree/master/examples/motion_control/open_loop_motor_control)**
>
> Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library - simplefoc/Arduino-FOC

---

<div class="post-metadata">

### Author: ![certified\_prime](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/c/3bc359/32.png) [@certified\_prime](https://community.simplefoc.com/u/certified_prime)
#### Post date: [February 25, 2026, 3:47am UTC](https://community.simplefoc.com/t/possible-error-in-the-open-loop-tutorial-code-missing-motor-loopfoc/8006/3 "2026-02-25T03:47:20Z")

</div>

motor.loopFOC() was not required previously for Open Loop velocity control. only closed loop. has that changed with the new version?

---

<div class="post-metadata">

### Author: ![Antun\_Skuric](https://community.simplefoc.com/user_avatar/community.simplefoc.com/antun_skuric/32/21_2.png) [@Antun\_Skuric](https://community.simplefoc.com/u/Antun_Skuric)
#### Post date: [February 25, 2026, 9:27am UTC](https://community.simplefoc.com/t/possible-error-in-the-open-loop-tutorial-code-missing-motor-loopfoc/8006/4 "2026-02-25T09:27:52Z")

</div>

`loopFOC` is not mandatory because we now can choose between all the torque control strategies for the open-loop control.

- voltage (the only one possible till v2.4.0)
- estimated current
- foc current
- dc current

And loopFOC is the one doing the torque control.

---

<div class="post-metadata">

### Author: ![certified\_prime](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/c/3bc359/32.png) [@certified\_prime](https://community.simplefoc.com/u/certified_prime)
#### Post date: [February 25, 2026, 3:33pm UTC](https://community.simplefoc.com/t/possible-error-in-the-open-loop-tutorial-code-missing-motor-loopfoc/8006/5 "2026-02-25T15:33:02Z")

</div>

Ohh! Interesting. I definitely need to try out 2.4.0 now. I will update my device this weekend.
