It communicates fine with RealTerm.
Works fine with a Nano but the CE and CS pin numbers are reversed from other examples.
@Artic_Eddie, I think it would make sense to freeze this until we hear from the OP.
I doubt if either of us is going to get one of those USB adapters nor use the code that they use ![]()
...R
I agree. We've found more info than the OP probably expected and more than enough to get started. I've got the sketch working on a Mega and Nano. From this point onward, I would move to an optimizing approach for my own needs but already have something working which is much faster.
It's an interesting device and could be further exploited.
E
Hi for all,
I found some Manual for this USB device on Chinese,
I use Google translate and make readable on English,
maybe will help...
I also found *.exe, some PC software also on Chinese,
I will try to attach,
regards
USB_to_PC_nRF24L01.zip (273 KB)
Serial_debugging_assistant.zip (181 KB)
pasicr:
Hi for all,
I found some Manual
Have you read ALL the Replies that have been made while you were absent? Please do so.
...R
Robin, yes I read all reply's from my topic,
I am new in Arduino, I only read and try to understand,
I know, the best solution will be to use two Arduino...
but because I have that USB board I ask for advice,
thanks
best regards
@pasicr
Give us the numbers on top of the two large chips on the adapter. One of them is the UART and may say CH340 while the other is an AVR controller.
The adapter communicates by AT+ commands. One of the links we sited gives the command list.
pasicr:
I am new in Arduino, I only read and try to understand,
I know, the best solution will be to use two Arduino...
but because I have that USB board I ask for advice,
thanks
I do understand where you are coming from. The problem is that we do not have one of those devices and cannot experiment on your behalf.
Wireless is particularly difficult to debug because you generally get no indication about why it does not work.
One possible approach is if you have a demo PC program for using the device and post the code we may be able to suggest Arduino code that would work with it. But I am not going to suggest code for a PC program because there is just so much that could be wrong with it because I can't try it myself.
...R
PS. It is nice to get some feedback when people make suggestions - just like you would respond to someone who was talking to you.
On the board, one IC is CH340, the second dont have text on it,
Robin, I can send you one board for test, just share with me your info...
pasicr:
Robin, I can send you one board for test, just share with me your info...
Thank you for the offer but I am not prepared to take on that level of involvement and the device has no value for me. In any case I am travelling at the moment so I don't have any convenient postal address.
...R
The CH340 is the UART, or serial to USB converter, as expected. The other one is some kind of MPU, the one of real interest, and probably from the AVR family.
The example sketch in one of the links will run on about any Arduino with a USB port and connected to the RF24. I tried the sketch with a Mega2560 and an Nano V3 and both run as expected using the AT+COMMAND method. You can access the adapter on the PC using any terminal program such as RealTerm. However, you will still have to write the code for the remote unit. I would suggest putting a 2:1 voltage divider from Vcc to Gnd and connecting the center to an ADC input. At the PC end, you should see a number close to 512. There are numerous examples for two way communication using the nRF24L01+ boards. Start there and work your way up to more exotic applications.
Good luck.
Arctic_Eddie:
The example sketch in one of the links will run on about any Arduino with a USB port and connected to the RF24.
I wonder if you are thinking about the problem from the opposite end to the OP.
AFAIK he has a USB adapter that allows an nRF24 to be connected directly to a PC and he wants to be able to write a PC program that can allow that device to communicate with an Arduino.
If the OP replaces the USB adapter with a second Arduino I can't see any value in using the code that is on the USB adapter when he can simply use the regular nRF24 library code. And using the USB code on an Arduino still leaves the problem of how to write the PC program.
@pasicr, it occurs to me that if you get a second Arduino (in place of the USB adapter) and get it working with your PC and your existing Arduino (which we can certainly help with) you would then have a lot more knowledge with which to approach the problem of using the USB adapter.
...R
I was thinking only of using the sketch as an example of how to get an Arduino to talk directly to a PC through the USB connector and not use a separate FTDI. The sketch itself would need vast improvement as it's both slow and limited in RF24 control functions.
I was also thinking along the same lines as you in getting a second Arduino and running the ping-pong example, your train, or similar, to learn both Arduino code and RF24 communication. The OP has some basic knowledge to gain before diving into the final app.
Arctic_Eddie:
I was thinking only of using the sketch as an example of how to get an Arduino to talk directly to a PC through the USB connector and not use a separate FTDI. The sketch itself would need vast improvement as it's both slow and limited in RF24 control functions.
Sorry if I am being more dense than usual today ...
As I understand it the OP has a USB adapter, nRF24(B), nrF24(A) and Arduino(A). He wants the send data like this
PC --> USB adapter --> nRF24(B) ~~~~~ nrF24(A) --> Arduino(A)
I have been suggesting (and I think, you also) that he gets Arduino(B) and uses this set up
PC --> Arduino(B) --> nRF24(B) ~~~~~ nrF24(A) --> Arduino(A)
in that context I don't understand what you have in mind with the text in bold above. In my mind there would be no role at all for the AT+ commands in the situation where there are 2 Arduinos.
...R
PC --> Arduino(B) --> nRF24(B) ~~~~~ nrF24(A) --> Arduino(A)
That's what I have in mind also. The AT sketch is only for learning some of the possible coding techniques. I would not use that method myself. I have my own six byte binary command/device/data packet scheme running at 2.25Mbps through a separate FTDI adapter so as to leave the programming USB open for debugging.
Thanks Eddie and Robin for your's very useful suggestions,
I will try to fix my problem using:
sensor > arduino A > nRF > nRF > Arduino B > PC
to collect data from sensor,
also I will try to search useful solution for USB board that allow to use nRF directly to the PC without second Arduino,
I will inform you about my result,
thanks again and
best regards
p.s. can you advice about softSPI lib for Arduino UNO? what is the best lib for softSPI according your's experiences?
What Arduino are you using - why do you need softSPI?
...R
I use Arduino UNO,
but I also use RTC/SD board and SD use SPI pins,
because that I need softSPI to add nRF on the same board...
Hardware SPI can communicate with several devices - you just use a different I/O pin to select whichever device you want to talk to.
...R