Code support for Dc motor and Servo reacting to IR Sensor feedback

Well it doesn't compile because you have an extra }. Also readDistance() takes a parameter which is never used and is declared as an int but doesn't return anything. That's not going to help.

There may be other problems but why not at least get it compiling first then test it and let us know what it does and doesn't do.

Steve