Ir Sensor is connected with Arduino Uno and coding is developed in MATLAB Simulink. Monitor the output in display block. Ir sensor output is 0 when the obstacle is detected and the output is 1 when it is not detected.
Ir sensor properties is changed by connecting NOT gate to the Digital input block of Simulink model.