# Loop / Repeat Sequence

**URL:** <https://forum.farmbot.org/t/loop-repeat-sequence/4397>\
**Category:** Feature Requests\
**Created:** [December 29, 2018, 12:31am UTC](https://forum.farmbot.org/t/loop-repeat-sequence/4397 "2018-12-29T00:31:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Holualoa\_School](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/h/eada6e/32.png) [@Holualoa\_School](https://forum.farmbot.org/u/Holualoa_School)\
**Post date:** [December 29, 2018, 12:31am UTC](https://forum.farmbot.org/t/loop-repeat-sequence/4397/1 "2018-12-29T00:31:16Z")

</div>

I propose adding a **REPEAT** field to the **Execute Sequence** block so that sequences can be looped.

 ![Execute%20Sequence](https://forum.farmbot.org/uploads/default/original/2X/9/9c2f8ed1bfb16f3e385fa43ff0a73ff2550943d9.jpeg)

Looping, as you know, is core principal in programming and I think that this feature would be useful in many situations.

I imagine the block would default to **1** in the **Repeat** number field.

---

<div class="post-metadata">

**Author:** ![Ascend](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/a/a9adbd/32.png) [@Ascend](https://forum.farmbot.org/u/Ascend)\
**Post date:** [December 29, 2018, 11:50am UTC](https://forum.farmbot.org/t/loop-repeat-sequence/4397/2 "2018-12-29T11:50:54Z")

</div>

Why would you repeat the exact same sequence over and over?

---

<div class="post-metadata">

**Author:** ![Holualoa\_School](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/h/eada6e/32.png) [@Holualoa\_School](https://forum.farmbot.org/u/Holualoa_School)\
**Post date:** [December 29, 2018, 4:32pm UTC](https://forum.farmbot.org/t/loop-repeat-sequence/4397/3 "2018-12-29T16:32:54Z")

</div>

One thing I remember about gardening is that when growing from seed, you want to 2 or 3 seeds in the same spot as there is no guarantee that every seed will germinate. So in the example I created, it shows the planting of a seed repeated 3 times. This would also decrease the possibility of no seed being planted when the sequence isn’t monitored closely.

Another reason for repeating is that if you have a sequence of relative moves, you could repeat that sequence and cover the entire bed. Lets say you want to water the entire bed, you run a sequence that picks up the water tool and moves to the start position and turns the water on. Then you would repeat a sequence of relative moves that moves the length of the X axis, move the Y axis over some amount, move back the length of the X axis, and move Y axis some amount; making a serpentine like path across the entire bed.

Another reason would be for weeding. It would seem that stomping down on a weed location wouldn’t be successful on the first try, so taking multiple stabs might better ensure success. This coupled with another request I made for [Random Move Relative](https://forum.farmbot.org/t/random-move-relative/4399) would greatly reduce sequence blocks.

---

<div class="post-metadata">

**Author:** ![Gabriel](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/g/9de0a6/32.png) [@Gabriel](https://forum.farmbot.org/u/Gabriel)\
**Post date:** [December 3, 2019, 2:03pm UTC](https://forum.farmbot.org/t/loop-repeat-sequence/4397/4 "2019-12-03T14:03:57Z")

</div>

Loop functionality is available via [the groups feature](https://forum.farmbot.org/t/october-22-2019-software-update/5567).

---

<div class="post-metadata">

**Author:** ![Gabriel](https://forum.farmbot.org/letter_avatar_proxy/v4/letter/g/9de0a6/32.png) [@Gabriel](https://forum.farmbot.org/u/Gabriel)\
**Post date:** [December 3, 2019, 2:04pm UTC](https://forum.farmbot.org/t/loop-repeat-sequence/4397/5 "2019-12-03T14:04:01Z")

</div>

Closed on December 3, 2019, 2:04pm UTC


