Serial MCU to MCU not working

Hello,

I am having a heck of a time sending and receiving (decoding correctly) .

I am sending payload defined as byte where as the <> as chars. the payload corresponds to button presses. I see the TX working correctly in serial monitor and mapped out case statements in the RX section based on the numbers I see in serial monitor.
When I connect the two MCU's together. TX to RX pin, I am not seeing any expected response in hardware (turning on/off LEDS). If I connect the RX section to serial monitor I can send < 10 > for example and triggers my hardware output. Currently I have LEDS on a port and I can trigger them with serial monitor.
I have a feeling I am not "talking" the same serial language across TX and RX, but both work independently with serial monitor. I know this has got to be a simple thing I am missing.

TX section:

void transmitIr() {

  Serial.print('<');                                                      // transmit start character
  Serial.print(loadTX_Decode);                                          // transmit button press status
  Serial.print('>');                                                      // transmit end of transmission character

}

The RX section:

void RecvWithStartEndMarkers() {
    static boolean recvInProgress = false;
    static byte ndx = 0;
    char startMarker = '<';
    char endMarker = '>';
    char rc;
 
    while (Serial.available() > 0 && newData == false) {
        rc = Serial.read();

        if (recvInProgress == true) {
            if (rc != endMarker) {
                receivedChars[ndx] = rc;
                ndx++;
                if (ndx >= numChars) {
                    ndx = numChars - 1;
                }
            }
            else {
                receivedChars[ndx] = '\0'; // terminate the string
                recvInProgress = false;
                ndx = 0;
                newData = true;
            }
        }

        else if (rc == startMarker) {
            recvInProgress = true;
        }
    }
}


// ---------------------------------------------------------------------------------------------------
// DecodeIR converts the serial data from 2 byte characters, to 1 byte integer. Then hands it down to
// the switch case to update the status of the MotorDutyRight, MotorDutyLeft, MotorSelectRight and 
// MotorSelectLeft. 
// ---------------------------------------------------------------------------------------------------

void DecodeIR() {
 if (newData == true) {
   ReceivedIR = 0;            
   ReceivedIR = atoi(receivedChars);          // covert text string to integer
  

  switch (ReceivedIR) {
    
    case 10:                                 // Forward
      MotorDutyRight = 255;                  // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 255;
      MotorSelectRight = HIGH;               // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = HIGH;
    break;


    case 20:                                 // Reverse
      MotorDutyRight = 255;                  // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 255;
      MotorSelectRight = LOW;                // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = LOW;
    break;


    case 30:                                 // Right
      MotorDutyRight = 100;                  // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 255;
      MotorSelectRight = LOW;                // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = HIGH;
    break;


    case 40:                                 // Left 
      MotorDutyRight = 255;                  // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 100;
      MotorSelectRight = HIGH;               // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = LOW;
    break;


    case 50:                                 // Foward + Right
      MotorDutyRight = 100;                  // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 255;
      MotorSelectRight = HIGH;               // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = HIGH;
    break;


    case 60:                                 // Forward + Left
      MotorDutyRight = 255;                  // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 100;
      MotorSelectRight = HIGH;               // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = HIGH;
    break;


    case 70:                                 // Reverse + Right
      MotorDutyRight = 100;                  // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 255;
      MotorSelectRight = LOW;                // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = LOW;
    break;


    case 80:                                // Reverse + Left
      MotorDutyRight = 255;                 // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 100;
      MotorSelectRight = LOW;               // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = LOW;

    break;

    case 90:                                // Turbo
      MotorDutyRight = 255;                 // Duty cycle to motor 0 = FULL OFF, 255 = FULL ON
      MotorDutyLeft = 255;
      MotorSelectRight = HIGH;               // HIGH = motor bridge forward, LOW = reverse
      MotorSelectLeft = HIGH;

    break;

    default:                                // Stop movement
      MotorDutyRight = 0;
      MotorDutyLeft = 0;
    break;
  
  }  
        newData = false;
    }
}

Always post ALL the code. Did you connect the grounds?

Hi that is all the code in a pair of test sketches. I stripped out the core to get the basic function to work. Minus the Int , char...etc. of the variables. So I can get the "basic comms working" before adding the rest of the logic in.

Yes there is a common ground. I have a NANO connected to power with common ground to a Trinket M0 3.3v board. The serial out of the NANO is 5 volts going to a pair of series resistors that drops it to 3.28v going into the Trinket. The wave form looks good at 3.28v, the wave form transitions are nice and clean. I can see changes on my scope when I press buttons. Again, everything seems to work independently via serial monitor but not connected together.

I will paste in the complete segments I am trying to get working. If I can't get basic sending < 10 > to go across and do basic I/O triggering. The complete original code is pointless. Stand by I will cut and paste. thanks

No, it is not. setup() and loop() are required, but missing. Post the minimum code required to reproduce the problem.

Are the serial Baud rates correct and consistent?

Just get basic serial communications working between the two boards, before adding anything else.

Please edit your post to add code tags.

I strongly suggest that you get serial communication working alone before adding any other code.

You should not be attempting to use the serial monitor in parallel with anything else. Instead, use a second serial port, or one of the four software serial libraries.

yes I edited the issue.

Example of communication between an Arduino and a serial UART radio module:
http://www.martyncurrey.com/arduino-and-hc-06-zs-040/

I solved the problem. So obvious I could kick myself. Serial comms are default USB. To talk to the other UART you have to put a "1"...my test code works. Now time to debug my original code.

example:
while (Serial1.available() > 0 && newData == false) {
rc = Serial1.read();