Hi, I am struggling with one particular instance in my code. I have made a circuit using arduino uno which during day time, using LDR to sense sunrise and switches off the balcony lights automatically. Simultaneously after some gap, it operates one pump from a reservoir tank to water my plants for certain time frame. After this, the light remains off but the watering of plants do not repeat. During sundown, the ldr based circuit and arduino switches on the lights in balcony and again the watering pump starts for certain time frame, after which it stops, but the light remains on. This repeats everyday.
My first half of the program runs perfectly but during night time, the pump is getting on after certain interval again and again. Can someone help me which part is causing this to happen?
Code is here : Automated Plant Watering and garden lighting
Note: Am not good with coding so excuse my codes