LDR doesn't work

@Mathijs I just connected the LDR, but i don’t get a usable signal from it. It just displays me 4095 as the input signal, so the highest value i suppose. Covering the LDR doesn’t change anything. I attached a photo of my setup and my code. I changed the cables, the resistor, the ground connection and even the LDR.
If i deattach the 3.3V the Value drops to 0 as it should. Do you have any idea where the problem might be?

Edit: if i rebuild the Setup with my Arduino Mega, then it works, guess there is something wrong with my ESP32 right? :frowning:

Can you try a different GND pin on your ESP32?

Edit nevermind, you already tried. Really strange behavior indeed.

Are you sure the breadboard connection is working properly? Do you measure 3.3V with a multimeter?
Also you can use some other pins to try and read out the value. Does it work on other pins?

I tried it with other ones, but that didn’t work, it showed the same result.

And i will check the voltage when i am at school next time! The breadboard connection might be a cause, i will check that this weekend.