control Dc motor (using l293d driver) using IR sensor

Hello,

Can Anyone guide me how to interface DC motor with IR sensor, i want that when some obstacle come m motor should run otherwise stop. please help me its urgent

L293 motor control

We need data sheets for the DC motor and IR sensor to be of more help.