Hi All, i have been fighting with this for half a day. I am attempting to connect an NRF24l01 to a rp2040-zero. I can not find a reliable source of information regarding this. Does anyone know the pin assignments for SPI0 and SPI1 on this board under Arduino?
Thank you in advance.
Hey @Peter2075,
I haven’t seen any specific guides for this combo, but it should be a fairly 1:1 adaptation from similar development boards. The NRF24l01 communicates over SPI, so I imagine you could use a guide meant for the Raspberry Pi Pico and use the SPI pins on the rp2040-zero.
The guide below should be a good starting point:
Hi Zach, thank you for the reply. The issue i seem to be having is finding the default SPI pins that Arduino uses. From what i see, the SPI bus can be set up on a selection of deferent pins which makes it very flexible but also difficult to find the default pins used by a given compiler.
Regards
It’s not the compiler that assigns defaults for the Arduino IDE - it’s the Board that is selected. To find the default pins for the Arduino IDE select the Board you intend to use and then run a simple program that includes the SPI library and print the values of the pins.
#include <SPI.h>
void setup() {
Serial.begin( 9600);
Serial.print("MOSI "); Serial.println(MOSI);
Serial.print("MISO "); Serial.println(MISO);
Serial.print("SCK "); Serial.println(SCK);
Serial.print("SS "); Serial.println(SS);
}
void loop() {
}
Thank You Jeff105671, that was what i needed. Was not aware of such a thing until now.
Regards