In this project, I used a photoresistor, 10K ohm resistor, 2N3904 NPN transistor to build a dark detecting circuit. As shown in the circuit schematic below, when there is light, the particles of light hit the phototransistor, which enables the current to pass through the transistor, and with it the LED is switched off. When there is no light current freely passes through the transistor, lighting up the LED. Then I carved a pumpkin and placed it on the circuit. The pumpkin lights up when it is dark.