Can't get water(plant) Lua helper working

I am running farmbot genesis V1.2 the first commercial available version

the water(plant) is not working, I think the water write pin is wrong

I have water on pin 9 and vacuum on pin 10

where can I look the water(plant) script to have a look at it in the delevoper gibhub to try to understand more the function?

Thanks for pointing this out. Here’s an explanation and a solution for you:

The water() function uses the dispense() function under the hood. dispense() uses pin 8 by default, which is the pin that operates the solenoid valve in FarmBot models after v1.2 that have our custom Farmduino electronics.

Luckily the dispense function supports optional parameters that allow for overriding the pin number. This is documented here.

And the water function also supports optional parameters that all just get passed into dispense(). This was not previously documented, but I’ve updated the docs now with the info and example code.

TLDR, this should work for you: water(plant, {pin = 9})

And if you’d like to dive in deeper, here is source code for the Lua helper functions in FarmBot OS.

thank you very much

is it possible to make a copy and modification of this function that is integrated in the lua helper functions in Farmbot OS?

my goal will be to water the plant at variable heights depending on the plant heiht curve…

now the defaul Z is the “safe Z”

best regards

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