how can i declare multiple serial ports of arduino mega? as for single it is like given below?
#include <SoftwareSerial.h>
SoftwareSerial mySerial(18,19); // RX, TX //how this syntax can be modified for multiple Rx module?
void setup()
{
Serial.begin(9600);
}
void loop(){
Serial.write(45); // send a byte with the value 45
int bytesSent = Serial.write(“helloâ€); //send the string “hello†and return the length of the string.
}