Pin confusion

I have the sketches MasterSwapRoles and SlaveSwapRoles downloaded from

Each starts with

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

#define CE_PIN   9
#define CSN_PIN 10

As advised in the tutorial I am using RF24 TMRh20 (version 1.1.7). In the tutorial at
these are the CE and CSN pins listed for one RF24 library but the pins listed for TMRh20 RF24 Library are 7 and 8 respectively.

There is obviously some confusion. Does one change the code, or change the pins?

MasterSwapRoles.ino (2.37 KB)

SlaveSwapRoles.ino (2.27 KB)

From the page you linked:

Later we will show the pinout. NOTE!! Different Libraries use different pinouts from nRF24L01 to Arduino!!

Change the code to match the wiring, or the wiring to match the code. Whichever you prefer.

Thanks, Nick.