The only other variable is the resistor R2, which should only require initial adjustment to get the correct frequency. The Software Ask any engineer who has actually built a robust machine, and the engineer will tell you that the world is far from perfect. Few things work as cleanly as they do on paper. Sensors are especially sensitive to the outside world, and more often than not require some additional help in picking out the useful information from the 'noise'. This is where the software comes in.
Lets write a function that determines if there is an obstacle in the way.
This indicates where, if any, the object might be. The Tips Build yourself a little IR detection tool. This requires a Sharp GP1U5X, a visible LED, and a resistor. With this little tool, you can check to see if your IR detector is actually emitting IR or not. Black plastic is a good example.