Need help with adc converter + serial monitor

I'm unfamiliar with C programming. So i need your guidance :) I'm using the Arduino Duemilanove-Atmega168

Using voltage divider rule, i connect 5V to a fixed resistor, from fixed resistor to a variable resistor then to ground.

Using the adc converter, i want to display a digital number from 0-1023 using the serial monitor depending on my variable resistance (i.e. change in analog input voltage).

I do not know how to write a program that reads my analog input voltage from my variable resistor and display a digital discrete number on serial monitor as the resistance (variable resistor) changes.

Can some1 pls help? :D Been struggling for weeks...thank youuuuuuuuuu!!! Appreciate it

Been struggling for weeks...

I'm pretty sure there's a tutorial or example over at www.arduino.cc, I'm surprised your searches didn't find them

There isn't an example of using serial monitor to display discrete digital numbers from analog input voltage...i did try searching for it.......only found programs that does adc only... :)

There isn't an example of using serial monitor to display discrete digital numbers from analog input voltage...i did try searching for it.......only found programs that does adc only...

Maybe, and this is just blue sky thinking here, you could combine one sketch that does the conversion and another that does the printing.

When is our assignment due?

[edit]You really didn't search very hard.[/edit]

Here's a start:

void setup ()
{
  Serial.begin (9600),
}

void loop()
{
}

Now all you have to do is write one more line.

Make sure you credit the forum in your write-up.

Not trying to be too contrary here, but I think you need to add two more lines.

Hmmm. On further reflection, I guess you could indeed do it in one line. It's probably easier to understand if you use two lines, though.

Thanks people!! After you guys assistance, i managed to display the discrete digital number according to the value of my variable resistor. Your help is appreciated! Never regret creating an account on this forum :D