API Endpoint for garden size

Hi there, I couldn’t find the API endpoint that gives me the size of the garden. Something like the max x,y,z that the bot can travel would be fine. Thanks.

@Wathik Good question. I think the reason people have trouble guessing this one is because the garden size is measured in steps rather than MM like people are used to seeing in the Farm Designer.

Here’s an example of how you could change the X axis length via the API:

  1. Download the firmware_config JSON object from https://my.farm.bot/api/firmware_config/
  2. Determine your steps per MM value for the X axis. You can find this value in the movement_step_per_mm_x field. For the sake of example, let’s say that your movement_step_per_mm_x value is 5.0.
  3. Determine the length you want to set your X axis to. For example, let’s say you want to set the X axis length to 1000 (this makes it easier to do math).
  4. Multiply the desired axis length by the movement_step_per_mm_x. 1000.0 * 5.0 = 5000.0
  5. Set movement_axis_nr_steps_x to the value calculated in step 4.
  6. Perform a PATCH request to /api/firmware_config with the new value.

I hope this helps! Let me know if you have any other questions.

2 Likes

Thank you, I will try it out. :+1:

1 Like