An emitter-detector pair sensor may be incorporated into a powered or electronic ophthalmic lens. The emitter-detector pair sensor may be configured to determine the distance from the sensor to an object in its path. Based upon this information, a system controller of the ophthalmic lens may output a signal to an actuator of the ophthalmic lens to control a variable power optic of the ophthalmic lens.