Arduino Water Pump

![](http://Water pump). Can anyone tell me how to code and wire this water pump up to an ardruino to spray water when it detects the temp. is too high / the humidity is too low?

Wire a digital output from the Arduino to run the pump. But, if the pump requires too much current, use a relay or a transistor.

void setup() {
  pinMode(pumpPin, OUTPUT);
}

void loop() {
  Read(temperature and humidity from a sensor);
  if (it's too hot or too dry) {
      digitalWrite(pumpPin, HIGH or LOW depending on activation polarity of pump);
  }
}

And add:
else
{
turn off the pumpPin
}

THNam:
![](http://Water pump). Can anyone tell me how to code and wire this water pump up to an ardruino to spray water when it detects the temp. is too high / the humidity is too low?

No one's gonna help you that way. Even if you get the complete code, you can't make it work.

So, take it step by step, play with Arduino and then where you stuck, ask for help.

Let's break it down...
Several tasks

humidity
temp
spray water

Choose sensors
Identify setpoints for temp & humidity
Identify spray method - gravity fed, lift pumpo, transfer pump, spit etc...
Choose power, pump and spray delivery head

Develop each part individually
Then tie them together

OP, what sensor have you been looking at using?

THNam:
[img]http://Water pump[/img] Can anyone tell me how to code and wire this water pump up to an ardruino

It seems your image link didn't work, so nobody knows what "this" water pump is.