I am using a Arduino uno and am facing a problem with reading from serial monitor when I type a number in serial monitor and click send it displays the number I sent and then it automatically takes zero as the next number.
So can you please help me with this..
aarg:
Turn off the line ending setting in the serial monitor (set to no line ending)
@OP
This is the layout of Serial Monitor (Fig-1). Look for the 'Line ending tab' and choose 'No line ending' option. Also, change this line: Serial.print(r); to this line: Serial.println(r); to get the nicer format of your message on the OutputBox of Serial Monitor (Fig-2).