Automated Gardening System

What would the code be for this ?

For the LM1380 ? Just connect a pullup resistor (10k or whatever) to the open collector output of the chip and when the output turns OFF because it no longer senses water (the transistor turns off), then the digital input to the arduino will change from a LOW to a HIGH because the transistor is no longer pulling it to ground. A simple digitalRead(Water_Sensor) is all you need.
http://arduino.cc/en/Reference/DigitalRead