Sunday, February 24, 2008

Sensors and Time_Arduino code

int photocellPin = 0;
int value = 0;


void setup() {

Serial.begin(9600);
pinMode(photocellPin,INPUT);

}

void loop() {

value = analogRead(0)/2;
Serial.print("photocell:");
Serial.println(value);
delay(10);

}

No comments: