10x for the fast reply
when infrared sensor is no longer=0 (the tank went enough distance from the wall) - no more interrupt will occur since pin2 value=1 (as long as the sensor is not sensing anything ---> 1 is the default sensor value) - when no interrupt occurs and joystick is either idle or tilted - a new value is set to xx_new,yy_new and the tank will move as desired.