Basic question about sequences and defining plants


#1

I am not sure if this is the best way to start, but here is how I am setting up our Farm(Bot):

Assumptions:

  1. I am using the Web UI exclusively - no FarmWare (yet)
  2. This is all in reference to the SW - I will note the non-SW related tasks as needed

How I have programmed FB so far:

  1. Plan the plot
    a) Picked the crops (Carrots, Kale, Cauliflower, Beets, Lettuce, Broccoli, Green Onions, Cilantro, Bell Peppers, Habanero Peppers)
    b) Created (using Farm Designer) the actual layout - Placed the crops (in rows)
  2. In the Sequences tab, I created a bunch of “Move To” Sequences
    a) One for every plant
    b) Name and structure is: “Move To Row #01 Carrot #01” - This creates a X & Y on the 2D grid, and I left Z at “0”
  3. Now that I have each plant defined, I use this as my atomic for all the rest of my routines (Water, Seed, etc.)

So, my question is this:
Before I get too deep into the sequences, is there a better way to call out and define each plant, or is this the basic format most FarmBotians follow?

Thanks for any input and ideas.


Sequence sharing / sequence hub
#2

Just to add more detail to how our garden grows…

Using my plant atomics, I created a series of sequences to water. Because I want the FarmBot to water and move as efficiently as possible, and because we may, over time, want one row of crops watered at a different frequency, I created two “sub-sequences” for each row that instruct FB to go in a set direction for each row and a “Light Water” sequence.
Example:
“Light Water”:
“Turn Water On”
“Wait 2000 ms”
“Turn Water Off”

Direction #1 (“Water Onions Row #01 Onion #01 To #42”):
“Move To Row #01 Onion #01”, “Light Water”, Move To Row #01, Onion #02”, “Light Water”…

Direction #2 (“Water Onions Row #01 Onion #42 To #01”)
“Move To Row #01 Onion #42”, “Light Water”, “Move To Row #01 Onion #41”, “Light Water”…

And…

Direction #1 (“Water Carrots Row #02 Carrot #01 To #42”):
“Move To Row #02 Carrot #01”, “Light Water”, “Move To Row #02, Carrot #02”, “Light Water”…

Direction #2 (“Water Carrots Row #02 Carrot #42 To #01”):
“Move To Row #02 Carrot #42”, “Light Water”, “Move To Row #02 Carrot #41”, “Light Water”…

Now I can create a sequence that uses these sub-sequences based on the ending position of the last row:

Main Water Sequence #01:
“Turn On Lights” (FB is at a school - This lets the kids know it is about to start)
“Find Home” (Set everything to 0, 0, 0)
“Get Watering Nozzle”
“Water Onions Row #01 Onions #01 To #42
“Water Carrot Row #02 Carrot #42 To #01
… (do all rows)
“Find Home” (reset to 0, 0, 0 so next step has good registration)
“Return Watering Nozzle”
“Turn Off Lights”
End

Next, I created Farm Events that call these mega-sequences each day (or every other or 2x a day or whatever)
Over time, if we decide we want row one watered every other day, I would then only need to remove that row from a sequence, replace any rows after it with the other direction for those rows, save it as a new sequence and then replace that event in the Farm Designer.

Ok, if you got this far and I have not confused you (or myself), here are the questions:
1). Is this a common method folks use? (or similar)
2). Can anyone show a more efficient way to do the same? This method produces a lot of sequences for us. We have 15 rows and 310 crops - do the math and you (we) end up with many, many sequences.

Welcome thoughts, feedback, ideas, criticism (be nice) or any other commentary…


#3

Also, a bit of an aside:
While sharing raw dedicated nested specific sequences might just great noise, finding a way to share methods, flows, structure composition and logic would be, imho, VERY useful.
If only we had a common framework (thinking flow chart like) that we all could use…


#4

Thanks for sharing your methods Tony. I have used a similar method before, though I find it unwieldy when the number of plants exceeds ~30. A lot of this will be solved with our implementation of variables though in the meantime here is another method I’ve used that you could consider:

If you your plants are in rows, evenly spaced, and you are taking care of them all in the same way (for example a row of evenly spaced Onions all planted at the same time) then consider this method:

Water Row 1 (42 Onions)

Find Home
Move To: First Onion
Execute Sequence: Water 7 Onions
^ Repeat 5 more times for 42 Onions total
Find Home

Water 7 Onions

Execute Sequence: Water 1 Onion
^ Repeat 6 more times to for 7 Onions total

Water 1 Onion

Execute Sequence: Dose water
Move Relative: The distance to the next Onion

Dose water

Control Peripheral: Turn on water
Wait: 2000ms
Control Peripheral Turn off water

One weird side effect of this is method is that at the end of the “Water Row 1 (42 Onions)” sequence, the FarmBot will Move Relative one final time (to a place with no Onion) before returning to home. That usually isn’t a big deal though if you have the Stop at Max setting enabled.


#5

Awesome! (and Thank you Rory & FarmBot!)

Here is the first challenge! (for me)
All my plants have coordinates matching the following:
X = The X-axis coordinate of the plant
Y = The Y-axis coordinate of the plant
Z = “0” The default that a plant is created at when placed on the map.

Now, I created a bunch of sequences to move to the plants, and then to water the plants.
The FB gets the Watering tool, travels to the first plant (its x,y & z coordinates), waters, them moves to the next.
Now, lets say I want to water plant “A” from a Z-axis position of “0”. All is good!
But, if I want to water from any other position, I have to set an offset, for that plant.
And, If i want to water the next plant at that same height, the FB will either raise the Z, travel to plant “B”, and then lower Z, or I have to explicitoy set the “Move To” for each plant.
Lots of Z movement or edits…

So, it seems to me that I can either go and edit all my plants (300+) to have a Z that is maybe in the middle, or edit each “Move To” in each sequence to eliminate the Z moving, except when I want it to.

Does anyone have any other thoughts or ideas?