Proximity sensor

I surrounded colored parts of the circuit which was connected to the wire color surrounded: