Robin2:
How about you read the very start of the Thread in Serial Input Basics - Programming Questions - Arduino Forum and move on to the updated version of Serial Input Basics which everyone else is using. Then there would be a lot less confusion.PLUS ... take account of what @sterretje said about
...R
as i said to @sterretje with an example of the output from the terminal, with that part of the code, with out it, with it stationed on the moon, results may vary see store for details offers not valid in the UK or Canada, void where prohibited....