Go Down

Topic: How to Implement Sensors with Different Baudrate on Mega ? (Read 114 times) previous topic - next topic

anandraut

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

wildbill

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.

anandraut

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

pert

File > Examples > 04.Communication > MultiSerial might be a good place to start. There is a tutorial that goes along with it:
https://www.arduino.cc/en/Tutorial/MultiSerialMega

You'll find the information to help you understand the code here:
https://www.arduino.cc/reference/en/language/functions/communication/serial/

Go Up