// gloabl variables int IRLED = 10; int IRcollector = analogRead(A0); // the setup routine runs once when you press reset: void setup() { //set pins to outputs or inputs pinMode(IRLED, OUTPUT); // initialize serial communication at 9600 bits per second: Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { //sit pins high or low digitalWrite(IRLED, HIGH); // print out the value you read: // Serial.println(IRcollector); Serial.write(5); delay(1); // delay in between reads for stability }