Give an interrupt from one arduino to other arduino

I have two Arduinos doing different work. The first Arduino is running a motor and the second Arduino is used for communication with the computer and other important stuff. The first one needs to stop running the program after it gets a signal from the second Arduino which I assume could be done if I can give an interrupt or any other signal from the 2nd one to 1st one that could be detected.
I found out that by I2C I could transfer data between arduinos but I just want to transmit a simple On and Off signal.
Is there any way I can give an interrupt signal or any kind of signal from one Arduino to other Arduino?

Thank You!

You can do digitalWrite() from one Arduino to an I/O pin on the other Arduino which is configured as INPUT or INPUT_PULLUP. You also need a common GND between the two Arduinos. You can then use digitalRead() or attachInterrupt() to detect the input.

Is this related to your other Thread?
If it is your attempt at a solution to the problem of reading a sensor at the same time as taking a step I suspect it is not necessary - but see my comments in the other Thread.

And if it is related it would be much more convenient if you click Report to Moderator and ask to have the two Threads merged.

...R

Thank you so much. When connection like this do I need to add a resistor or some LED in between to prevent short circuit?

Is this related to your other Thread?
If it is your attempt at a solution to the problem of reading a sensor at the same time as taking a step I suspect it is not necessary - but see my comments in the other Thread.

No, this is a different issue. Thank You!

You can add a small series resistor as a precaution in case you short something at the 'receiver' end.

Its value must be chosen in such a way that the maximum current through it does not exceed the maximum current that an Arduino output can sink or source. On an 328 based board, that is around 20mA so the lowest value will be Vcc / 20mA (for 5V, 270 Ohm).

Its value also can not be too high (e.g. 1 MOhm) as it will be sensitive to noise; I can't advise on a upper limit due to lack of knowledge in this area.

I would try a 1K.