Hello guys,
I have a ESP32-Cam module, which cannot use the analog pins and wifi simultaneously. In the project which I want to realize a photo must be shot when it is bright .
I use a photoresistor and wanted to ask you guys if the following circuit could work:
Both pins are set high.
If it is bright the resistance of the LDR is low and the transistor is switching which leads to the right pin becoming low.
I would be grateful for any advice or help
I have a ESP32-Cam module, which cannot use the analog pins and wifi simultaneously. In the project which I want to realize a photo must be shot when it is bright .
I use a photoresistor and wanted to ask you guys if the following circuit could work:

Both pins are set high.
If it is bright the resistance of the LDR is low and the transistor is switching which leads to the right pin becoming low.
I would be grateful for any advice or help