rcProtocol is a communications protocol I designed for remote-control systems. It is completely digital, and uses the RF24L01 radio module (specifically the tmrh20 RF24 library). The protocol will support two-way communications, receiver specific settings, multiple paired receivers, up to 10 channels per packet (12-bit precision), and possibly channel-hopping.
rcProtocol manages pairs and connects, which mean that any receiver that uses rcProtcol can pair with any remote that supports rcProtcol.
When the pair command is called, the program will hold until a receiver/transmitter is found, or the program times out. There are several things that need to happen when pairing. The receiver needs to get the transmitter's ID; This allows the receiver to know what channel to broadcast on when connecting. The transmitter will also get the receiver's ID so that it can organize device-specific settings. Then the transmitter will get the settings which will be saved for when they connect.
The connect command also holds until a connection is made or has timed out. The receiver sends its ID to the transmitter, this is done because the transmitter doesn't know which device will try to connect to it. The transmitter will then check to see if the receiver is saved. If the receiver is found, the transmitter will send an ok. Then both devices will load the settings, and test to see if the settings are properly set.