The RF network
The RF network that will be used for the sensor nodes is provided by the RF24Network library (https://github.com/TMRh20/RF24Network). This allows RN nodes to be networked in a tree structure in which each node can have up to five child nodes, since each individual node can listen to up to six other nodes at once.
As such, the addresses for the nodes are octal and follow the structure, as shown in the following diagram, where 000 is always the base node, 001 is a child of the base node, 021 is a child node of 001, and so on:
This allows a message to be passed to any node on the network by first transmitting it upwards through the tree until it reaches the first node that is a common path for both the sending and receiving node.
Setting up the Raspberry Pi
To set up the Pi as the base node for the RF network, we must first connect the RF module to the GPIO port and install the drivers that will allow us to receive messages send to it by using a Python script. To do this, perform...