I really do not understand the idea of "line ending". I don't get what that really means.
Look at the bottom of the serial monitor pane.
There is a drop-down that is labelled "line ending" or similar.
What is it set to?
(Why didn't you ask earlier?)
Oh but you are wrong
It's set to "new line"
So sorry, it was on "new line"
Now change it to "none" or "no line ending" and retest.
You should post code by using code-tags
There is an automatic function for doing this in the Arduino-IDE
just three steps
- press Ctrl-T for autoformatting your code
- do a rightclick with the mouse and choose "copy for forum"
- paste clipboard into write-window of a posting
best regards Stefan