Author Topic: RF24 Library Not Compiling  (Read 3031 times)

zeiv

  • Newbie
  • *
  • Posts: 2
RF24 Library Not Compiling
« on: April 29, 2016, 05:18:01 pm »
Hello everyone,

I was trying out the RF24 library that comes with the Oak package, but I haven't been able to get anything to compile with it.  I get an "fdevopen was not declared in this scope" error.  I made the changes suggested in this thread (https://digistump.com/board/index.php/topic,1099.0.htmlhttp://) without any luck.  Does anyone have any ideas?

I'm curious as to what the difference is between the RF24 library from the Oak Package and the default one.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: RF24 Library Not Compiling
« Reply #1 on: April 30, 2016, 11:52:25 pm »
I would suspect very little, if anything. It looks like the scanner code won't work 'as is' as there is no support for fdevopen in the ESP8266 Arduino core. It seems from this issue on the ESP8266 Arduino core support that you could change line #31 of printf.h from

Code: [Select]
  fdevopen( &serial_putc, 0 );
to
Code: [Select]
#ifdef ARDUINO_ESP8266_OAK
Serial.setDebugOutput(true);
#else
fdevopen( &serial_putc, 0 );
#endif

This is not he best way to do this, but it works... sort of. I then get a load a compile warnings related to RF24 related code progmem code (PSTR,strlen_P, PROGMEM) and finally an compile error when apparently trying to include a non-existent #include <WProgram.h>...

Without making any changes to the RF24 library files, if I simply comment out the #include "printf.h" and printf_begin(); lines of the scanner RF24 example, I get the exact same error messages, indicating there is something wrong elsewhere. Going by this post the progmem related warnings are fine, the final error is unexpected though...

That's all I have time to look at just at the moment...