Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I wanted to test my Nrf24L01 I wanted to be sure of it working fine, so I used this code for an Arduino Uno:

#include <SPI.h>
#include <RF24.h>
#include "printf.h"
#define RF_CS 9
#define RF_CSN 7
RF24 radio(RF_CS, RF_CSN);
void setup() {
  Serial.begin(9600);
  printf_begin();
  radio.begin();
  radio.printDetails();
}
void loop() {
  radio.printDetails();
  delay(5000);

}

The thing is when I opened my Serial, I got this each 5 second:

STATUS       = 0xff RX_DR=1 TX_DS=1 MAX_RT=1 RX_P_NO=7 TX_FULL=1
RX_ADDR_P0-1     = 0x0000000000 0x0000000000
RX_ADDR_P2-5     = 0xff 0xff 0x00 0x00
TX_ADDR      = 0x0000000000
RX_PW_P0-6   = 0xff 0x00 0x00 0xff 0xff 0x00
EN_AA        = 0xff
EN_RXADDR    = 0xff
RF_CH        = 0xff
RF_SETUP     = 0xff
CONFIG       = 0xff
DYNPD/FEATURE    = 0xff 0x00
Data Rate    = 1MBPS
Model        = nRF24L01
CRC Length   = 16 bits
PA Power     = PA_MAX

Which apparently means that there must be something wrong with the connection, as far as I know .

noting that i have this Nrf24L01 with 10 pins, so i tried to attach it just like the following picture shows :

enter image description here

So I tried to plug it in with the Arduino just like this: enter image description here

What was the mistake?

share|improve this question

I think problem lies in your Arduino sketch, specifically in this line:

#define RF_CSN 7

Now, you have set RF_CSN pin to pin#7 while actually, its connected to pin#9

To get this to working you, try changing above lines of code to:

#define RF_CSN 10

Hope it helps.

share|improve this answer
    
yes, true, that but I just discovered that the pins aren't even like the i.stack.imgur.com/5epm9.jpg image shows, but indeed it's a whole different setup, so i managed to solve my problem, thnx for your help – Med malik Apr 17 at 20:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.