Code only works correctly the first time?

Hi,
You now need to add Serial.println statements in your code to pin point problem areas.
At the moment lowering your delay figures will help you expedite the process.

Have you checked how your LDR input works. It may be working in the opposite direction to what you think.

Can you please post a circuit diagram of your project?
Just an image of a hand drawn schematic will be fine.

Thanks.. Tom.... :smiley: :+1: :coffee: :australia: