Serial Repeater

Yes "while (!Serial) " is indeed the error. It must be an error I made when I was copying code from an example. I'm not used to program in C, so my eyes just didn't catch it.
Now my only problem is, that when GRBL dump current settings, the text becomes more and more erroneous. Here's an example of the dump:

$0 = 200.000 (steps/mm x)
$1 = 200.000 (steps/mm y)
$2 = 200.000 (steps/mm z)
$3 = 50 (microseconds step pulse)
$4 = 250.000 (mm/min default feed rate)
$ = 5000 (m/indeaul sekrae)
$ =0.00(m/ac sgmnt
7  20 ste prtiner msk bnay  100100
8  1.00 aceleatoninmmse^2
9  005 (crnrig untin dvitin n m)
'x=vlu' o etpaamte o jst'

And the failures are not at the same positions each time.todup uren sttigs
o


And the failures are not at the same positions each time.