ESP32 getting ASCII decimals from Serial2 instead of char

Hi, I have acquired a Radar Module that I connected to the ESP32 Serial2 and it should report speed even when one waves a hand in front of it.

First I connected the Radar Module to an FDDI (USB to Serial) adapter and used Putty to monitor the serial on the PC.

The radar module output is simple:

wait
wait
wait
wait -2,128 (km/h)
wait -3.098 (km/h)

And so on showing the speed when I wave my hand in front of it.

Then I connected it to my ESP32 (Serial2) with the code below:

void setup(){ 
  Serial.begin(115200);                     // Define and start serial monitor
  Serial2.begin(115200);
  Serial.println("Radar Test.");
}

void loop() {
  while(Serial2.available()){
    Serial.print(Serial2.read());
    if(!Serial2.available()){
      Serial.println();
    }
  }
}

And the output I get when I wave my hand is:

16:54:38.790 -> 119971051161310
16:54:38.883 -> 119971051161310
16:54:38.883 -> 119971051161310
16:54:38.930 -> 119971051161310
16:54:39.023 -> 1183210511532
16:54:39.023 -> 455046495755324010710947104411310
16:54:39.070 -> 119971051161310

I noticed that 119 = w, 97=a, 105=i, 116=t and 1310 = carriage return and line feed.

Why Am I getting decimals instead of the char?

Assistance welcome.
Thanks
Paulo

Use Serial.write() instead of Serial.print() if you want to see characters and not their ASCII decimal code.

The read() function returns an int, not a char.

Hi, thank you for your input.

Solved with:

void loop() {
  String BTString="";
  char   c;
  while (Serial2.available()) {
    delay(3);
    c = Serial2.read();
    BTString += c;
  }
  if(BTString.length()>0){
    Serial.println(BTString);
  }  
  BTString = "";
}

Regards
Paulo