https://education.thinksphysics.com/2022/09/optical-sensor-working-principle-simple.html