You could initiate a watchdog reset on receipt of a message.
This would also be a good solution, could you also help me? I have never used watchdog
Is it possible to reset an arduino uno using a serial message?
The ONLY way to reset the Arduino is to press the reset switch.
There are ways to sort of (but not really) reset the Arduino in software. The exact approach depends on exactly what you want to reset. Call setup() and start looping again? That needs one approach. Turn off all the attached hardware, and force a hard restart? That requires the reset switch. Perform a soft reset? Another approach, but one that depends on exactly what you mean by a soft reset.
If i was able to get it to call setup() and start looping again that would be great. Could you point me in this direction?