I don't have a state machine tutorial link at hand, but maybe some readers could supply that.
You should probably learn the switch statement,
which comes in handy to implement a state machine.
For the NRF part, you should probably use RF24_250KBPS,
which has a longer reach and higher error margin.
https://nrf24.github.io/RF24/classRF24.html#aeb9920e7a95699748b003c4a839b0814