Here's a snippet from a detailed tutorial I've written for Tuts+
....You will be able to monitor the sensor locally on the LCD or remotely, via ControlMyPi.com, and receive daily emails if the moisture drops below a specified level.
Along the way I will:
- wire up and read a value from an analog sensor over SPI using a breadboard
 - format the sensor reading nicely in the console
 - display the sensor reading on an RGB LCD display
 - have the Raspberry Pi send an email with the sensor reading
 - easily monitor the sensor and some historic readings on the web
 
Read the whole tutorial here: Build a Raspberry Pi Moisture Sensor to Monitor Your Plants
