Arduino Contol Fails

abhijeetv2:
I have not seen in past couple of years someone advising me so dumb!!!

I understand that some people use language here that runs people up the wrong way.

However, in my opinion, there is a simple question to ask yourself "Would the person offering the advice be easily able to get my project to work?

If the answer is YES (and it usually is) then the advice is useful, however roughly it may be expressed.


I don't consider myself anything special as a programmer, but I reckon I'm better than average at diagnosing problems. You will make NO progress with your problem until you insert code to show what values are actually being produced by the LDR. This was suggested to you by @PaulS twice.

You should also draw a diagram showing how everything is connected - including power supplies - and post a photo of the diagram. Many times the sort of symptoms you describe are due to an inadequate power supply.

...R