LDR breaks over time what to do?
I have the following circuit which was running for a long time but at one point something broke and it started producing high values such as 4133 or 30412.


The ATMEGA328 chip used in your device has a 10-bit ADC which can only give output readings of 0 to 210-1 = 0 to 1023. Your errors suggest a code or display error.

Please edit your question to include the essential parts of your code to show the configuration, the analog read and how you are displaying the ADC value. (Use the {} code button to format the code properly and use the preview below the editor to make sure it is indented correctly before submitting.)