ESP32 HardwareSerial

Hello,
i have some trouble with esp32 an HardwareSerial!
here my script for testing the Serial....

#include <HardwareSerial.h>
HardwareSerial Myserial(1);
void setup(){

Serial.begin(9600);
Myserial.begin(9600);
delay(1000);
Myserial.println("Hello World");
Serial.println("Hello World");
}
void loop() {
{

Serialprint run fine It Shoows me pic1

But MyserialPrint shows me some characters.... pic2

I would be glad if someone could help me with this....
Thank
Patrik

pic2.JPG

pic1.JPG

What's the baud rate setting in serial monitor?

The Serial Monitor has 9600 baut on both (Serial and MySerial)...

Try changing

Myserial.begin(9600);

to

Myserial.begin(9600, SERIAL_8N1, RXD, TXD);[code]
where RXD and TXD are the pins you're using

same resualt... pic :confused:

How do you have it wired up?
Are you using a usb to ttl device?
Provide a schematic/wiring diagram

here some pics.....

That looks like a USB to RS-232 device. I don't think it works in the way you're using it.
You need a USB to TTL device, similar to this. or this.
You can find cheaper ones on ebay I'm sure.

Also, for the DUE and the ESP32, I found that a Serial.flush() after the end of a serial print sequence helps rid those funky printer characters.