I don't think I showed you how I'm reading the values so far.
It's all through USB... It's supplying the ardiuno power and a way for the ardiuno to communicate to my computer...
This is my serial monitor outputting the values.
The values jump/dance around like it's being hit by photons, kinda cool. So I wrote the code to find the average within every second...
NON-PAR code...(NOT FINAL)
Code:
unsigned long average = 0;
unsigned long time;
int counter = 0;
void setup() {
Serial.begin(9600);
time = millis();
}
void loop() {
int sensorValue = analogRead(0);
average += sensorValue;
counter++;
//every second or 1000 millis
if(millis() > time+1000) {
average = average/counter;
Serial.println(average);
//reset timer & counter to get ready for the next second.
time = millis();
counter = 0;
average = 0;
}
}
Oh, I double checked the readings by going outside... Full sun will give me the maximum value of 1023.. In the shade, around 100-120.