IRSensor library module rewritten