LDR doubt (WRONG THREAD, SORRY)

SORRY, WRONG THREAD. I TRY TO ERASE THIS !!!

Could you please explain me why if I cover the LDR i’ve got more tension (voltage) at white cable.

The energy flows from red cable, pass through fixed resistor and after the LDR and ends at the ground (I imagine).

Thanks a lot again.

Good day

The answer is simple, the more light the LDR gets, the lower the resistance is. For example in full sun the LDR is a dead short (0 ohm) and your white cable will read 0V. In total darkness the resistance climb to Mega ohm raising the voltage to 5V. Try switching the LDR and resistor, or as I did just correct it in your code.

Hope this helps