I’m assembling a simple irrigation system, composed only by a pump and a valve. I’m not really good on programming, and I could not find any related topics here.
A water pump should not run dry, as it may damage it. I was thinking about adding a flow meter after the valve, that would guarantee that water is flowing, before the pump is activated.
I actually already have a code for the flow meter, that measures the flow, and I think I can adapt it for this use.
The thing that I would like to know, is how to insert this code into the programming of the OSpi.
It should work something like, open valve>measure flow>activate pump. If water flow is interrupted during the process, than OSpi should stop.
Dan is probably the best person to answer this question, but I can provide a starting point. If you look at OSPi.py, there is a function called:
I believe that’s the main loop.
p.s. I get lots of requests from users about customizing the software. A lot of the customizations are actually very easy to implement if you have some programming skills. If you are not familiar with programming, I think this provides a good motivation to learn programming 🙂