Reading extra serial value

Hey;

I'm trying to read from serial, and it does.But after reading the value as expected it always reads a DEC 10 value.Even if I send a blank value, it returns 10 !!

it's a Mega Board with 2560 Processor, it seems to be genuine board i found at the lab but not sure for %100.

O.S. Windows 10 and IDE is 1.6.6 and the code is the same with the read() example sketch.

Thanks all

Edit: With the same board and same code also on same IDE runnıng ın wın7 no problem at all

When you press Return the Serial Monitor will send the line termination characters you specify in the menu at the bottom of the window:

  • No Line Ending
  • Newline
  • Carriage return
  • Both NL & CR

I suspect it is set to "Both NL & CR" and the sketch expects either "Newline" or "Carriage return". Try different options until it works as you expect.