How can I declare multiple serial ports for Arduino Mega as it has been in the example 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.
}
SoftwareSerial
?