SleepyPi2, Pi-Z, NRF24L01 + I2C Shield

Hello

I need to connect a PiZ/SleepyPi2 to a an NRF24L01, to receive data from a tank sensor which is transmitting using another NRF24L01.

Problem is, the PiZ/SleepyPi2 are using the pins needed for SPI (for handshaking and programming) so I need some other mechanism.

I was thinking I could use one of these shields, which store and convert data from the NRF24L01 and make it accessible over I2C on address 35. When there's no data, I2C address 35 responds with 0x47. There's another topic in the forum which talk about this shield's limitations:

What would be an easier way to achieve what I need? I need the SleepyPi2 handshake and programming functions (which gracefully shut the RPI down etc). Would rather not hack the SleepyPi2 code or board to use other pins.

Any other ideas how to connect the Pi to the NRF24L01?

It would help if you were to tell us what a PiZ/SleepyPi2 is.

...R
Simple nRF24L01+ Tutorial

The SleepyPi2 is an Arduino (ATMEGA320P) board with pinouts designed as a Raspberry Pi shield. It low standard power and TWi/Wire libraries, has an onboard RTC and serial interface to program the Pi.

Pi-Z is the Raspberry Pi Zero.

Although this isn’t an arduino product, it presents some common problems also experienced with arduino and the NRF24L01. In that it occupies the pins for SPI connectivity. Hence, why I’m looking at these 12C shield adapters, so I can access the NRF24L01 via I2C.

Problem is, the PiZ/SleepyPi2 are using the pins needed for SPI (for handshaking and programming) so I need some other mechanism.

No you don’t. The only thing you need to add another SPI device is one digital pin. You can have dozens of devices hanging on the same SPI bus, each device has its own enable line and the other three signals are common to all devices.

The “shields” that convert the NRF24L01’s to I2C are actually SPI to serial converters that just happen to interface using I2C. You must use them on all nodes as you do not access to the internal message structure when using them. They are not quite what they appear to be.

Actually it looks like my Raspberry Zero might work. Sorry - I appreciate this has become more of a Raspberry issue, not arduino, because the ATMEGA328P on the Sleepy Pi2 might not be using the SPI bus afterall.

This link here:

...states the SPI pins for the Raspberry Pi 3 (same as Zero) are:
SPI GPIO Pin
MISO GPIO09 21
MOSI GPIO10 19
SCLK GPIO11 23
CSN GPIO08 24
CE GPIO17 11

Which are not used between the RPi and SleepyPi, which use:
3 GPIO 2: i2c-SDA – i2c bus available for communication with RTC and Arduino
5 GPIO 3: i2c-SCL – i2c bus available for communication with RTC and Arduino
8 GPIO 14: Serial RXD – used for programming the Arduino
10 GPIO 15: Serial TXD – used for programming the Arduino
15 GPIO 22: Arduino Reset line – used for programming
16 GPIO 23: RTC Alarm – Active low RTC alarm output
18 GPIO 24: General purpose / Handshake – Command Pi Shutdown
22 GPIO 25: General purpose / Handshake – Pi is Running

So - I might not need the TWI/I2C shield afterall. Nice.

If you describe the project you are hoping to create it will be much easier to help. At the moment this is a classic XY Problem

For instance you can use an nRF24 with an RPi without needing an Arduino.

...R