# Can not upload code because of loop

**URL:** <https://forum.xod.io/t/can-not-upload-code-because-of-loop/5929>\
**Category:** Install/Upload Problems\
**Created:** [February 28, 2022, 12:30am UTC](https://forum.xod.io/t/can-not-upload-code-because-of-loop/5929 "2022-02-28T00:30:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dolphino](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/dolphino/32/3466_2.png) [@dolphino](https://forum.xod.io/u/dolphino)\
**Post date:** [February 28, 2022, 12:30am UTC](https://forum.xod.io/t/can-not-upload-code-because-of-loop/5929/1 "2022-02-28T00:30:01Z")

</div>

Hello everyone! I am creating a project that rotates a stepper motor one half step every 10 seconds.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/b/bb54f2acf597c575ff9e182555c219c5b8307bd6.png)

I am fairly new to xod and I would appreciate help on this topic. The library I am using is txgruppi/stepper-28byj48.

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [February 28, 2022, 4:19am UTC](https://forum.xod.io/t/can-not-upload-code-because-of-loop/5929/2 "2022-02-28T04:19:20Z")

</div>

Whenever you loop back up the patch in XOD, you need to add a defer node to help XOD resolve the loop during compile. It can go before or after your pulse… node

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [March 30, 2022, 4:19am UTC](https://forum.xod.io/t/can-not-upload-code-because-of-loop/5929/3 "2022-03-30T04:19:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
