sensorValue = 0; ! void setup(){ pinMode(ledPin, OUTPUT); Serial.begin(9600); } ! void loop(){ sensorValue = analogRead(sensorPin); if(sensorValue>250){ digitalWrite(ledPin, 0); } else { digitalWrite(ledPin,1); } Serial.println(sensorValue,DEC); delay(1000); }