0

nrf905\ nRF905-All-In-One-Shield\ RadioHead-master\ RadioHead\

None any of them are compiled with their examples without getting errors.

Error message:

nRF905_RX.ino:4:20: fatal error: NRF905.h: No such file or directory
compilation terminated.
Error compiling.

Libraries used:

Elechouse RadioHead Github RadioHead Doxygen zkemble/nRF905

dda
1,5951 gold badge12 silver badges17 bronze badges
asked Jul 7, 2015 at 6:24
15
  • Which Arduino? What version of the IDE? Where did you get those libraries from? (link). What error messages? Try to give a bit more detail. Commented Jul 7, 2015 at 6:28
  • actally I have the same problem in 1.5.2 and 1.6.5 the links are : github.com/elechouse/nRF905 github.com/PaulStoffregen/RadioHead airspayce.com/mikem/arduino/RadioHead github.com/zkemble/nRF905 I intend to connect it with arduino uno when the code will be verified correctly . Commented Jul 7, 2015 at 6:34
  • the error message is : NRF905.h : No such file or directory compilation terminated Commented Jul 7, 2015 at 6:42
  • @SalamEtaiwi - where have you put the libraries? Commented Jul 7, 2015 at 6:45
  • in the libraries folder at arduino folder that I use Commented Jul 7, 2015 at 6:48

1 Answer 1

1

The errors you were getting when you compiled was because if the libraries were extracted straight to the Arduino library folder from the .zip, the file path becomes too long for the compiler to find it.

So what you need to do is to create a new folder in the libraries folder for each library.

Note: you cannot do the standard libraryName\src\foo.cpp as this seems to give errors for these libraries (in that it does not find them).

What you need to do is to make a file in the libraries directory; for the zkemble one you can create a main folder called nRF905, then take the files under nRF905/arduino/nRF905 from github and place them in the folder created earlier. It should look like this: enter image description here

You should repeat this for the Elechouse one as well as it solved the problem too. i.e.

  • C:\\...\libraries\NRF\examples\
  • C:\\...\libraries\NRF\NRF905.cpp
  • C:\\...\libraries\NRF\NRF905.h
  • C:\\...\libraries\NRF\keywords.txt

Also of importance is that once you have the library from Elechouse compiling you need to open up the .cpp file and go to line 16, where there is

PROGMEM unsigned int freq_tab[10] = {

and to this add const, like so:

PROGMEM const unsigned int freq_tab[10] = {
dda
1,5951 gold badge12 silver badges17 bronze badges
answered Jul 7, 2015 at 9:42
3
  • thanks alot I did what you said ,actually most of the examples give no errors , but there are others give anyway I am now satisfy with this and I tried with a couple of a code (transmitte and recieve ) no errers was in transmite one and the serial monitor showed the right things but the problem was in the recieving side , the Rx led didnt lighting on ’ and not any data in the serial monitor. these are the codes ( transmitte , recieve): Commented Jul 9, 2015 at 9:49
  • sorry , it cant be sending , but they are the examples from "RadioHead" library ,, nrf905_client ,,, nrf905_server ... Commented Jul 9, 2015 at 9:53
  • @Salam - first off, glad it worked. I would recommend posting a new question here. And then I would recommend you open an issue on the RadioHead github page so you can bring it to the attention of the libraries author, he might also be able to give you a accurate answer. I am also on a phone at the moment so can't do much. Commented Jul 9, 2015 at 10:29

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.