Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html
Can you make a list of all your INPUT and OUTPUT devices, that is sensors and pumps and switches and indicator lights please.
This is a good place to start, we are glad you have some code working to prove you concept.
HINTS;
- keep putting Pin in your pin number assignments, ie motor1Pin, motor2Pin, soil1Pin, powerPin etc, I noticed a couple missing the Pin annotation.
- any value try soil1Val, soil2Val.
I am sure others will have more naming suggestions, this helps with reading and structuring you code.
With 16 "channels", it may be worth using arrays to define your variables, which will shorten your code.
If you are using a UNO then you will need to look at input and output multiplexing as the UNO will not have enough I/O pins, especially analog inputs.
I'm not sure what soil moisture sensors you are using, if it is the soil conductivity type then check for corrosion during use, this can effect the readings above the actual soil moisture.
Tom... ![]()