Merge two arduinos' sketches/codes

Good morning to everyone,
I'm doing a university project related to CDMA signal encoding and decoding (bit sequence writing /reading in general).
Encoded signal is produced by an Arduino (Arduino 1) using digitalWrite and decoding is done by another Arduino (Arduino 2) using analogRead.

First problem : I have to use two Arduinos because Arduino 1 has to continuously produce signal (CONSTRAINT), so it cannot stop to acquire the encoded signal with analogRead.
Therefore the problem is that Arduino 2 can't stop running to acquire signal from Arduino 1 (I cannot stop Arduino 1 to communicate with Arduino 2)

Second problem (connected to first one): Is there a compact and more elegant way to merge the 2 codes or sketches!?
I would like to use one sketch or one IDE in order to have a portable/user-friendly interface.

More elegant than what?

You can do the equivalent of analogRead, but without the tedious 100us wait, if you're willing to do a little work.

What does it mean "the equivalent of the analogRead"?

With "elegant" I mean to use only one IDE or external interface to control both the 2 Arduinos, so that it can be simpler for other users.

I mean, if you look at analogRead, it does four things;
It sets up the input mix
It starts the conversion
It busy-waits on conversion complete
It reads and returns the result.

You can skip the busy-wait,if you write your own code.

I've already done it. I set up the prescale factor to 16 using the ADC registers (125 KHz sampling rate), while the encoded signal of Arduino 1 is tens of KHz fast. This should be enough.

The problem is that I want to control both the two Arduinos with the same code or interface. Is that possible?

Here is some advice on combining 2 sketches:

And some more:

Search the forum, there's lots about this.

On the other hand this:

Suggests you don't want to combine 2 sketches into one, you want to put the same sketch on 2 (or more) Arduinos. Of course you can do this, just program one, disconnect it, connect the second one and program that with the same code.

This is the point. Thank you!

I'm not clear if I have helped, does what I said tell you what you needed to know? If not then please ask the question in a different way.

Thanks,