#include
int photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the analog resistor divider
int value;
int a = 0;
void setup() {
Serial.begin(9600);
for (int i=0; i <25; i++){
photocellReading = analogRead(photocellPin);
Serial.print("Analog reading = ");
Serial.println(photocellReading);
EEPROM.write(i, photocellReading);
delay(3600000);
value = EEPROM.read(i);
Serial.print(i);
Serial.print("\t");
Serial.print(value);
Serial.println();
}
for (int i=0; i <25; i++){
value = EEPROM.read(i);
Serial.print(i);
Serial.print("\t");
Serial.print(value);
Serial.println();
}
}
void loop(){
}
Graphed Results (Analog Results, not ones stored in EEPROM):
No comments:
Post a Comment