Angle sensor and IR sensonr