Go Down

Topic: problem using the nRf24l01+ (Read 124 times) previous topic - next topic

hanut

I have two nrf24l01+ modules both of which i have to use in transciever mode.
I have tried every possible library two program them but have no result. I am using the 10uF capacitor, i am using jumpers and have checked the connections but don't get any data exchange.

With the nRf24l01 library,
the scanner.pde gives out number of zeroes and the ping test does not work. On using radio.printDetails() however, i get the following output.
Quote
STATUS       = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0x1c1c1c1c1c 0x7070707070
RX_ADDR_P2-5    = 0x38 0x38 0x1c 0x1c
TX_ADDR       = 0x6c6c6c6cec
RX_PW_P0-6   =  0xe0 0x1c 0xe0 0x38 0x38 0x1c
EN_AA       = 0x1c
EN_RXADDR   = 0x1c
RF_CH       = 0x38
RF_SETUP        = 0x1c
CONFIG         = 0x1c
DYNPD     = 0x38 0x38
Data Rate = 2MBPS
Model       = nRF24L01
CRC Length  = 16 bits
PA Power     = LA_MED

From what i have seen on the forum and other places, this says my module works. But if that is the case, why does it not show any transmission.?

I used the RadioHead library also and here, with the basic sketch loaded on my arduino UNOs, i get init failed.
Please advice.

Thanks!

bambuino

Aloha -- Have you tried maniacbug's libraries? I use those libraries for getting sensor data from remotes, and for sending joystick commands to a robot. My needs are pretty rudimentary, and maniacbug's libraries have served me well. -- Mark

avr_fred

A very common mistake when starting out with the NRF24L01's is using only one instance of the IDE. When you have both boards connected to the same IDE, you can only run one debug window which will hang the board that has no debug window.

The solution is simple, just start a second instance of the IDE, connect to the second board and open a second debug window and you'll be off and running.

cjcj1949

If the sketches you are using send output to usb, they will hang until the usb output gets to the terminal window. You will need to use the Tools/Port command to show the usb com port values and each terminal window will need to select its own com port number.

You can also comment out the print output if you do not have a usb connection.

hanut

Okay!
Thanks everyone for your replies.
Firstly, I am using maniacbug's RF24 library. It does provide me with info on calling printdetails but i cannot get the two modules to communicate!
Secondly, I'm using two laptops for configuring and using the UNOs so that is not a problem for me!

Thirdly,Yes, I am using COM ports for the communication over the USB if that's what you need to know!
So sadly none of the solutions worked.


Thanks

hanut

Could anyone explain to me how this http://www.elecfreaks.com/203.html


might work. I think i am not using the correct libraries because i get the following error code
Quote
This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 (Windows NT (unknown)), Board: "Arduino Uno"
sketch_mar16a.ino: In function 'void setup()':
sketch_mar16a:7: error: 'SPI_DIR' was not declared in this scope
sketch_mar16a:7: error: 'CE' was not declared in this scope
sketch_mar16a:7: error: 'CSN' was not declared in this scope
sketch_mar16a:8: error: 'IRQ' was not declared in this scope
sketch_mar16a:11: error: 'init_io' was not declared in this scope
sketch_mar16a:12: error: 'SPI_Read' was not declared in this scope
sketch_mar16a:16: error: 'TX_Mode' was not declared in this scope
sketch_mar16a.ino: In function 'void loop()':
sketch_mar16a:24: error: 'tx_buf' was not declared in this scope
sketch_mar16a:25: error: 'SPI_Read' was not declared in this scope
sketch_mar16a:28: error: 'SPI_RW_Reg' was not declared in this scope
sketch_mar16a:29: error: 'WR_TX_PLOAD' was not declared in this scope
sketch_mar16a:29: error: 'tx_buf' was not declared in this scope
sketch_mar16a:29: error: 'TX_PLOAD_WIDTH' was not declared in this scope
sketch_mar16a:29: error: 'SPI_Write_Buf' was not declared in this scope
sketch_mar16a:33: error: 'SPI_RW_Reg' was not declared in this scope
sketch_mar16a:34: error: 'WR_TX_PLOAD' was not declared in this scope
sketch_mar16a:34: error: 'tx_buf' was not declared in this scope
sketch_mar16a:34: error: 'TX_PLOAD_WIDTH' was not declared in this scope
sketch_mar16a:34: error: 'SPI_Write_Buf' was not declared in this scope
sketch_mar16a:36: error: 'WRITE_REG' was not declared in this scope
sketch_mar16a:36: error: 'SPI_RW_Reg' was not declared in this scope

cjcj1949

There are lots of ways that you can have a problem. It could be software or hardware. The easiest problem to solve is to get an example to compile without errors. The easiest example to get working would be the scanner. You may have a problem with not having the correct interconnections, or a faulty uno or faulty Nrf24l01 boards.

When I used the scanner I had carrier detected over about ten channels. I used the rf-master library as it had the newest activity. Any library that people have reported working should be ok.

I have two unos as well and if you want I can test your modules and or unos or program your 328 chips.

I am in Bracknell UK and I have worked as a logic designer, but a long time ago.

bambuino

Could you post the sketch in code tags for which you get above error?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy