Messenger library

Ok, so you are sending messages from tera term pro to Serial1.

You know the link works because you have tested it with some code like:

while  (Serial1.available() ) Serial.print(Serial1.read());

that lets the Arduino IDE's Serial Monitor echo whatever you send from tera term pro.

Are you sure that tera term pro is sending carriage returns? Carriage returns must be sent to terminate a message.

Please test the following code. Send either a "0" or a "1" followed by a carriage return to either Serial or Serial1. A 1 will turn on the LED at pin 13, a 0 will turn it off. Also, all data received by Serial will be echoed to Serial1, and the opposite is also true.

#include <Messenger.h>

Messenger message = Messenger();
Messenger message1 = Messenger();


void messageReady() {
       while ( message.available() ) {
      // Set the pin as determined by the message
         digitalWrite( 13, message.readInt() );
      }
}

void messageReady1() {
       while ( message1.available() ) {
      // Set the pin as determined by the message
         digitalWrite( 13, message1.readInt() );
      }
}


void setup() {
  // Initiate Serial Communication
  Serial1.begin(9600);
  Serial.begin(9600);
  // Attach the callback function to the Messenger
  message.attach(messageReady); // Serial
  message1.attach(messageReady1); //Serial1
}


void loop() {
  int data;
  
  // Serial1
  while ( Serial1.available() ) {
    data = Serial1.read ();
    Serial.print(data,BYTE); // Echo data on other port
    message1.process(data); // Process data
  }
  
  // Serial
  while ( Serial.available() ) {
    data = Serial.read ();
    Serial1.print(data,BYTE); // Echo data on other port
    message.process( data ); // Process data
  }
  
  
}

Please report any and all error messages that this code generates. Please also include what is received by both serial monitors.