Electronic Mist Controller for Propagation

I’ll be using an Arduino controller and rain sensors to build an automatic mist controller for my cutting propagation. I couldn’t find anything off-the-shelf that met my needs: I want my mist irrigation to adapt to weather changes by increasing or reducing the frequency of watering cycles. I can use the rain sensors to simulate how quickly water will evaporate from my plant leaves. This is my first attempt at an Arduino project, programming… and I’m not too comfortable with electronics in general, so I’ll happily take advice and feedback from more experienced hobbyists.

Because I was learning as I went, I bought a little more than I needed to (like the whole Arduino starter kit). If I were budgeting this with only the parts I need, it would be in the range of $40 or $50.

Here’s the video of what I put together:

Below is the code I ended up using, which is a little revised from the first version in the video:

* Electronic mist control
* This my first attempt at Arduino coding – be kind!
* Most of this is just mashed together from the included samples

const int waterPin = 2;
const int threshold = 1600;
const int duration = 6000;
const int waterDelay = 10000;

void setup()

pinMode(waterPin, OUTPUT);


void loop()


digitalWrite(waterPin, HIGH);

int valsensor1 = analogRead(A0); // read input from 1st sensor
int valsensor2 = analogRead(A1); // read input from 2nd sensor

Serial.print(“Sensor 1 = “);


Serial.print(“Sensor 2 = “);


if (valsensor1+valsensor2>threshold) {

Serial.println(“Watering… “);

digitalWrite(waterPin, LOW);
digitalWrite(waterPin, HIGH);

} else {
Serial.println(“No water required”);