Forgot to mention, I want to build a robot that can extinguish from a certain distance. I have done interface the middle range IR sensor with motor. The problem is how to interface the flame sensor with middle range IR sensor so that the robot will stop when detecting a flame from a certain distance.