I am trying to compare the Power of two solar cells, to see which one is more effective. I am measuring: Amps, Volts and Time. But Unit should I use, that tells me how much electricity my cell actually has produced over the day? Watt hours or amp hours maybe? Or should I just calculate the average power of each cell?

How would I go about calculating watt hours? I mean V and A will change during, so I can't just take the last measurement and multiply it by 12 hours. Should I measure V and A say every 10 seconds, and just assume they stay the same during that time? (Like this for example: 5V x 1A x 0.0027hours (10 seconds))

If you collect data (V,A) and sample every second and multiply the two and save the result and add it to the previous result, at the end of an hour you will have a single result. Would that not be the average Watt/hours for that hour ? if you then save that result as hour_1, and do this for all 24 hours and add them all together would that not be the average output for one day ? If you divide that by 24 would that not be the average Watt/hour output for one day ? Couldn't you use nested FOR loops fir seconds, hours , and days ?
I don't know but that's my guess...

1 sample/minute is more than enough. I build a model to compare stationary and tracked solarcells, the project paper is in german, but you might be interested in the code and graphs, though.

Wouldn't it be better to average amps and volts and at the end of the day you would take volts x amps x 24?Because if the arduino takes a sample, say every minute, you would have a result of say 0.055123 watt hours. But the arduino would make this 0.06 watt hours. So over time you would drift off.

bestanamnetnogonsin:
Wouldn't it be better to average amps and volts and at the end of the day you would take volts x amps x 24?Because if the arduino takes a sample, say every minute, you would have a result of say 0.055123 watt hours. But the arduino would make this 0.06 watt hours. So over time you would drift off.

Different result, if you want to measure energy you integrate instantaneous power, floats are plenty
accurate for this, why round spuriously?

OP doesn't know Serial.print() syntax.
ie:
float val = 1.23456789;

Serial.println(val,8);

"spuriously..."
Really ?
Whewww ! ( I have to Google that, LOL)
I get "bogus , false ,fake, etc.."
How does that apply to OP's rounding intentions ?
( or maybe "unintentions")

@OP,

float val = 1.2345678910;
void setup() {
Â
Â Serial.begin(9600);
Â // put your setup code here, to run once:
}
void loop() {
Â // put your main code here, to run repeatedly:
Serial.println(val,10);
delay(1000);
}

For the sake of illustration, let's assume the solar cell output was EXACTLY the same for EVERY one of the 3200 samples taken in one hour,
then
All the samples taken every second ard multiplied by 3200 (normally they would ALL be different and would SUMMED up as described previously)

Â For (i=0;i<24;i++) // 24 hours in a day
Â Â Â Â {Â
Â Â Â Â Â Â For (i=0;i<60;i++) // 60 minutes in an hour
Â Â Â Â Â Â {
Â Â Â Â Â Â Â Â For (i=0;i<60;i++) // 60 seconds in a minute
Â Â Â Â Â Â Â Â Â {
Â Â Â Â Â Â Â Â Â Â // put code here to measure voltage output =>"volts = xx.xxxxx;"
Â Â Â Â Â Â Â Â Â Â // put code here to measure current output =>"currentÂ = xx.xxxxx;"
Â Â Â Â Â Â Â Â Â Â // put code here to multiply volts*current*0.000277Â Watt Hours
Â Â Â Â Â Â Â Â Â Â // put code here to save add result to previous result =>"float daily output =Â
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â XXX.XXXXX;"
Â Â Â Â Â Â Â Â Â }
Â Â Â Â Â Â Â }
Â Â Â Â Â
Â Â Â Â Â }