This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI communication between nRF51422 and Arduino

I want to set up an SPI communication between nRF51422 SOC (integrated on nRF51 DK) and Arduino board. I know that it is possible since I've read it in various posts and nRF51 reference manual. But, I couldn't find a working example for it (SPI) in the nRF51 SDK, as is given for UART communication.

I have read the SPI master loopback example and the SPI slave example, provided with the SDK, but I couldn't comprehend whether they could be used for TX or RX from nRF51's side. If they can be, then how?

For the SPI TX/RX from the Arduino's side, I've read the Arduino SPI Library and trying to implement it, in a similar manner as this (www.arduino.cc/en/Tutorial/SPITransaction). Does it look fine? If not, then what should be used instead?

Parents Reply Children
  • Thanks David for the link. It is pretty much what I was expecting. Follow-up: The example that you provided above would help me setting up a mesh-connection using "Bluetooth". I want to connect 8 to 12 devices in my network. Is it possible to achieve so using the Bluetooth SoftDevice? Also, does that example provide peer-to-peer support among all the nodes, or would I have to set up a "master" to control the entire mesh-connection? If it is not possible to connect 8 to 12 devices using "Bluetooth", can that example be used (with some modifications) to set up the mesh-connection using "ANT+"? If so, kindly explain the modifications to be done to the above example, as I'm a newbie. I've read that ANT can support upto 8 connection channels simultaneously, where each channel can support upto 65533 nodes. So, it would be possible to add more devices to my network in the future, using ANT.

  • Or, is there a separate example (like the above one), with the functionality of ANT? If there is one, kindly provide me its link. The network, that I am setting up, would be characterized by broadcast messages, peer to peer messages, and dynamic addition/removal of nodes. Thanks for your help and guidance.

Related