int LEDPin = 0; // LED positive terminal connected to analog pin0 and Negative lead to Gnd int LEDval = 0; // variable to store the value read void setup() { Serial.begin(9600); // setup serial } void loop() { LEDval = analogRead(LEDPin); // read the input pin Serial.println(LEDval); // debug value }