analogRead????

Hey,
ive uploaded this program to the Arduino Uno and should be able to get some response once the circuit it completed but im not seeing anything in the serial monitor. Its suppose to be a moisture sensor with two nails in the ground connected to the Arduino.
I have no idea of how the serial monitor works.
Anyone?

int moistureSensor = 0;
int moisture_val;
void setup()
{
Serial.begin(9600);//open serial port
}

void loop()
{
moisture_val = analogRead(moistureSensor);
Serial.print("mosture sensor reads");
Serial.println( moisture_val );'
delay(500)

}

OS: Win7
USB3.0

UPDATE:
Ive tried this http://arduino.cc/en/Tutorial/DigitalReadSerial tut. but the serial monitor still doesn't display any response when I push the button?? :astonished:

but the serial monitor still doesn't display any response when I push the button

Then the problem has nothing to do with the Arduino, since that second code will send data to the serial port every millisecond, regardless of whether you press the switch or not.

You should see stuff appear in the serial monitor, even if the baud rate is wrong. It won't make sense, but something will appear there.

Your code doesn't compile because of the single quote at the end of this line:

  Serial.println( moisture_val );'

What (if anything) actually got uploaded to the arduino?

True. Im trying out the tut. above(http://arduino.cc/en/Tutorial/DigitalReadSerial) though and nothing shows up on the serial monitor (same problem) even though the program IS uploaded to the Arduino.

So with the code from that example successfully sent to the arduino, when you immediately after open the serial monitor from within the IDE (top right in 1.0 onwards), you get nothing?

not anymore. It was because of the software. I was using an older version of Arduino ERW 1.0.1g. Once updated everything works. Thanks!
btw is there a way to save a log of the recieved date in the serial monitor???

I can't from Serial Monitor (running IDE 0022) but I can using Hyperterminal instead.
Really, use your favorite terminal emulator or find one you like.

btw is there a way to save a log of the recieved date in the serial monitor???

The cheap and easy way is copy and paste into a text editor, then save it.