This is not a sketch but a code fragment. Don't waste our time by posting fragments.
Right now the Arduino is simply a brick I don't know what the problem is.
Does that mean you cannot upload code anymore?
I already tried here to get help without success (more details):
Controlling Automower - Device Hacking - Arduino Forum
Don't start a new topic, you should have posted the code (the complete) in the original topic. And post the exact output you get from that sketch.