programming arduino to detect voltage or current from solar cells

hi, i recently bought 3 solar cells from radio shack, and i wanted to test them out but i don't have a voltmeter or anything...

i was thinking, maybe its possible to hook the negative lead from the cell to the ground of the arduino... and hook the positive lead up to an analog input of the arduino and try to figure out the current and/or voltage...

is this possible? how do i go about this?

Buy a voltmeter.

Yes it's possible to use the Arduino to measure voltage, but it will need careful setup and adjustment to get an accurate reading and you will need a voltmeter to find out whether the figure from the Arduino is accurate. Voltmeters are not expensive, and if you're interested in what your solar cells are producing you will definitely need an accurate way to measure the voltage and current.

Get yourself a cheap multimeter like this:

If you can afford an Arduino, you can definitely afford one of these.

each of the solar cells put out .55 volts DC in direct sunlight... i've got three cells... i'm not trying to get an exact measurement or anything i just want to be able to see if there is any current at all...

i'd just like to get it hooked up so that i can maybe read some numerical values through the serial monitor...

i wrote this code, but its not putting anything out in the serial monitor...

int sensorPin = 0;
int sensorValue = 0;

void setup()
{
  Serial.begin(9600);
}
void loop()
{
  sensorValue = analogRead(sensorPin);
  Serial.println(sensorValue);
  delay(50);
}

Do you mean its not writing anything to the serial monitor at all? or that it just writes 0 to the serial monitor?

The sketch looks okay. Do you have the negative side of the solar panels to GND, and the positive to A0 ?

actually, its all good... when i first made that post, i forgot to add "Serial.begin(9600);" to my code, so nothing was coming out of the Serial monitor for good reason...

i quickly changed the code, but then my internet started messing up before i could revise my post and take out the part where i'm saying that its not printing to serial...

so yeah, all is good. it works fine. Thank you