Controlling Automower

Change

if (strcmp (buffer, "digital") == 0)

to

if (strcmp ((char *)buffer, "digital") == 0)

and it compiles for me.

Problem happens if Automower has low battery. So I have to restart Arduino because it is probably not an issue of the code. How can I do this?

What happens if the mower is low on battery? Does the voltage that powers the Arduino drop? How much voltage do you have with a full battery? How much if it's getting empty? Where do you feed the Arduino with this voltage (Vin, 5V, power connector)?

You can restart the Arduino by pushing the reset button. You probably meant how to do it in software: that doesn't make sense because your software is already not running correctly, so don't expect it to reset itself.