This is my automatic watering project and I will describe what you need to do to get it working the way I did it. I'm not a programmer, just a hobbyist, I had to learn a lot to do this and I'm sure it can be done more professionally, but this stuff works and thats what matters. Its very basic. A Raspberry Pi powers the Arduino through USB cable. Arduino controls relay to water the plants and sends sensor data to Raspberry PI, which logs it, stores in .csv files and plots it every 5 minutes and saves .png file of the graph. Automatic watering works like this: it gets soil humidity sensor readings from the Chirp soil moisture sensor, if it is below the user-defined value, it closes the relay, and the pump stars working and watering the plants. To get the temperature and moisture readings, it uses 2 DHT22 sensors, gets the average values, rounds the number and thats your temperature and humidity. View the code and setup information here.