how to call a procedure using an arduino uno

Light a small fire in front of the gun. Then it will swivel back to face the fire. Now imagine that the fire is there, rather than really there. What part of the code do you need to execute to make it think it is facing this fire?