How to Implement Sensors with Different Baudrate on Mega ?

I am using ECG and DS18B20 which work on 9600 and ESP8266 and Pulse Sensor works on 115200. How to Implement all these on Arduino Mega. Thank You

The Mega has four hardware serial ports, each of which can run at a different baud rate.

You don't use serial to read a DS18B20 though.

Can you help me with a simple code to understand how to do it ? Thanks

File > Examples > 04.Communication > MultiSerial might be a good place to start. There is a tutorial that goes along with it:

You'll find the information to help you understand the code here: