How to use interrupt on dc motors

How to create a program for a mobile robot that continously move forward use digital pin 10,11,12,and 13 of Arduino Uno for the connection of the dc motor and having an interrupt that will stop the dc motor for 1 sec. if interruptpin 2 detects an edge triggered logic 1.

Thanks for the help.

See : https://www.arduino.cc/en/Reference/AttachInterrupt

But before you read that, ask yourself if you really need an interrupt for something as slow as a mobile robot.

AWOL:
But before you read that, ask yourself if you really need an interrupt for something as slow as a mobile robot.

If you decide that the answer is yes, because you have blocking code, then you MUST rewrite your code so that it is NOT blocking code, and abandon the idea that you need interrupts.

The ISR (Interrupt Service Routine) can NOT use delay() to stop the motors for one second. Which means that your whole concept of using interrupts is flawed.