int photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the analog resistor divider
void setup() {
Serial.begin(9600);
for (int i=0; i <10; i++){
photocellReading = analogRead(photocellPin);
Serial.print("Analog reading = ");
Serial.println(photocellReading);
delay(500);
}
}
void loop(){
}
Sunday, May 16, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment