
This is a circuit using an inverting Schmitt trigger to generate a sawtooth wave. The diode rapidly charges the capacitor, and the resistor slowly discharges the capacitor. The frequency of this oscillator depends on the values of R and C. If a light dependent resistor is used then the frequency will depend on how much light is hitting it. Low cost LDRs you can order from Aliexpress will very likely contain toxic heavy metals such as Cadmium,
which is why their use in new products is banned in the EU.

What if you were to replace both the resistor and capacitor with a LED. This component has a junction capacitance that will be charged when reversed biased, and when light hits it there will be a photocurrent that slowly discharges it.
Will this circuit still function as a sawtooth wave oscillator? I used an LM358 op amp and 3 resistors for the Schmitt trigger, and powered it from a USB powerbank at 5V.

I tried this with a couple of red LEDs in parallel. It oscillated at audio frequencies in bright lighting conditions. Room lighting at night time was sufficient. The frequency was in the audible range so I made a crude speaker driver from an NPN transistor so that I could listen to the signal.
I tested sensitivity to light emitted by various sources: a green LED, a red LED powered by coin cells, as well as white light from various LED flashlights. One flashlight has a dim mode that used pulse width modulation. Cadmium based light dependent resistors react very slowly to changes in light so had I used an LDR I would not expect to hear the effect of the PWM.
Since photodiodes react much quicker, I expected the reversed biased LED would be able to pick up the PWM effect on the oscillator. It sounded like there were two tones mixed together.
I had less luck using a reverse biased green LED -- this would not be sensitive to light of wavelength longer than what it emits normally. An infrared LED would probably work best.
The datasheet for a 5mm red LED does not always include the junction capacitance. It might be in the range 10-100pF. So it is approaching the capacitance of the breadboard itself. It would very likely react differently to light if I transferred this circuit using the same through hole components to a PCB.
bornach