having problem with interrupts and servo motors

I am using Sabertooth 2x25 to drive two motors ( using servo ) for the robot and using six Sharp GP2D15 IR sensor for obstacles avoidance. This IR sensor gives 1 when sense something and a zero when nothing is sensed. So to use the arduino interrupt, I actually used a NOT gate 7404 to invert the signal.

But when interrupt occurs, the wheels didn't change direction as how I programmed it to do.
I had tried it using LED to check whether interrupt occurs or not, as well as using oscilloscope to check out the waveform and sort. Everything working fine, but once I change the code to control the motor, the interrupt does occur but motor didn't change direction.

As I mentioned, I used oscilloscope to check the servo pulse generated, as interrupts occurs, no servo pulse is generated.

Any kind soul can help me with this problem? I had attached my program below.

ir_test_1.ino (1.13 KB)

You can detect rising or falling signals, so I don't see why you need to invert it.

The LOW interrupt you have chosen continuously fires if the signal is low. I suggest you change to RISING or FALLING and get rid of the inverter.