Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: NRF24 addressing using Teensy branch of Radiohead library

  1. #1
    Senior Member
    Join Date
    Oct 2019
    Posts
    160

    NRF24 addressing using Teensy branch of Radiohead library

    I am switching from using the RF24 library to using the nRF24 portion of the Radiohead library that Paul configured for Teensy. I did this in order to be able to use SPI1 and SPI2. However, in this library it appears that multiple addresses are not supported...ie broadcasting to a set of nodes is all that is supported. The RF24 library allows you to easily support up to 5 addresses. This is what I need.
    Is there a library out there that can give me both non-default SPI and multiple addresses?
    I may be able to use the existing library if I can get appropriate register write commands assembled. Has anyone done something similar?

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,207
    Radiohead does support multiple SPI buses, at least the RH_RF95 does. I played with this a long time ago.

    Where in my case I used SPI1, so I included:
    Code:
    #include <RHDatagram.h>
    #include <RH_RF95.h>
    #include <RHHardwareSPI1.h>
    The file in red is one that is setup to use SPI1, there is another one like it with ....2

    And you choose it with the constructor like:
    Code:
    RH_RF95 rf95(RFM95_CS, RFM95_INT, hardware_spi1);
    And I think most of the classes in this library are setup the same way, that is for example RH_NRF24 has it's constructor defined:
    Code:
        RH_NRF24(uint8_t chipEnablePin = 8, uint8_t slaveSelectPin = SS, RHGenericSPI& spi = hardware_spi);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •