I follow the example from arduino
int incomingByte = 0; // for incoming serial data
void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}
void loop() {
// reply only when you receive data:
if (Serial.available()) {
// read the incoming byte:
incomingByte = Serial.read();
// say what you got:
Serial.println(incomingByte);
}
}
but after I press "Enter"
I receive a 10
and if I type a number
I receive a number and a 10
15:57:53.769 -> 53
15:57:53.769 -> 10
how can I solve this?