Regarding setTimeInterval() Function

My time value is going on and it is not stoping,when I used the setTimeInterval function().
Friends anyone of you,please hell me yaar.

@sunty.apple, Please paste your code.

@sunty.apple,
“setInterval()” function repeats a given function at every given time-interval.(i.e the time value will always be incrementing.)
To stop the execution of the function specified in the setInterval() method, you can use “clearInterval()” method.(i.e to stop the incrementing time value.)

I already did that only dhruva,but it’s not stopping.it going continuously.
please help me yaar.

thank u for ur reply.
But I not understood,where to use clearinterval() method.
please help me yaar.

PLease paste your code which is not working .I will see the error in it and solve it for you…

thank u friend for ur reply.
Apart from that,now I had one major problem friend.
Unfortunately,my pin cable separated from bolt wifi module friend.
Below is the picture of that.


Please help me friend,I am in very worst situation.how to fix it friend.Please help me friend.

You can solder the oin back to the module

thank you friend.I have solved the problem.
friend in plant monitoring system I getting same values in both dark and light.
please give me solution to get different values.

1 Like

could you please give me your mobile number to contact you.

Check the connections of the resistor to a0 pin and GND also Check the connections of the LDR to a0 pin and 3.3v pin.
Look at the time of update. It may be that you are looking at old value, and not the new ones.
Or
Check your hardware configurations.
Or
Check your cloud product code.


I setted time for 5 minutes.
for every 5 minutes in darkness and light mode,I getting same value.
please help me friend.
above imagesare the results of my problem.

@sunty.apple

Are you using a resistor in series with the light sensor as mentioned in the training? If not please use it.
The A0 pin can detect voltage levels from 0 to 1V and converts it to equivalent range of 0 to 1023.

Your sensor must be getting voltage greater than 1V even in the dark room. Using a resistor should solve your problem. If you are already using it, please share a pic of the connection that you have made.

Bro, please check your connections. Your LDR is getting more voltage than required so you check your resistor colour coding and confirm that is 10K ohm resistor or not. If not please change your resistor .