Serial communication between two ATmega 8A uCs running Arduino bootloader

I want to program two ATmega 8A uCs using Arduino. I will be using MCUdude's MiniCore for this purpose.

Now, I want to implement Serial communication (sending a number) between the two uCs. For this purpose, I am following this thread on Serial communication. The thread beautifully explains how to receive the number. But it assumes that I will send the number from my PC. If I want to send the number from another uC, what function should I use: Serial.println() or Serial.write()?

Please note that I will not be using newline as the end marker; I will use '<' as the start marker and '>' as the end marker, much like in example 3 of the thread linked above.

I do not yet have the uCs, so please do not ask me to test the code at this moment. I will do so as soon as the uCs arrive.

N.B.: I am not sure if this is the correct forum for posting this question. It was a programming question rather than regarding the uC, so I posted it here. Please move it to the correct section if necessary.

The example you reference reads the number in as a string (e.g. "10") so you need to send it the same way which is using the print() function, not the write() function.

int myVariable = 10;
Serial.print("<");
Serial.print(myVariable);
Serial.print(">");

And: Serial.println() adds characters 10 (LF) and 13 (CR) to your string!

blh64:
The example you reference reads the number in as a string (e.g. "10") so you need to send it the same way which is using the print() function, not the write() function.

int myVariable = 10;

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

Thanks.

Erik_Baas:
And: Serial.println() adds characters 10 (LF) and 13 (CR) to your string!

Will keep in mind!