pot value

Aside from the fact that x is a lousy name for a global variable, and the value read from the serial port does not need to be global, the receiver code now looks good.

It is expecting a stream of data like '<', '6', '7', '2', '>' to arrive on the serial port, at various times during the data. If such data shows up, it will be collected in an array, and eventually (when the '>' arrives, the data in string will be "672", which will be converted to an int and sent back to the sender and to the serial monitor.

Unfortunately, the sender is not sending '<', '6', '7', '2', '>'. It is sending '6', '7', '2', , , so the receiver will never do anything. The receiver needs to have:

Serial.print("<");
Serial.print(val);
Serial.print(">");

instead of

Serial.println(val);

Oh, and the receiver needs to break out of the while loop when the '>' is received:
else if(x=='>')
{
ended = true;
break;
}