mistake between breadboard diagram with the code at Arduino Web (Tutorial Builtin Examples) The website link is : https://www.arduino.cc/en/Tutorial/WhileStatementConditional The Code for Arduino explained the Photoresistor Sensor Pin is at Analog 2 But the breadboard circuit, Photoresistor Sensor Pin is at Analog 0 Ref: http://forum.arduino.cc/index.php?topic=447038.0