RF24 icon indicating copy to clipboard operation
RF24 copied to clipboard

Examples make/compile fix

Open MortenMiddelthon opened this issue 8 years ago • 1 comments

For raspberry pi library examples, added missing header file for sleep(), unistd.h. Also changed pingpair_dyn.cpp to define variable "len" to 0 before trying to read from function. This would otherwise give me a compiler warning:

pingpair_dyn.cpp:172:42: warning: ‘len’ may be used uninitialized in this function [-Wmaybe-uninitialized] radio.write( receive_payload, len ); ^

MortenMiddelthon avatar Aug 12 '16 10:08 MortenMiddelthon

change sleep() to delay(milliseconds) change len to sizeof(receive_payload) you should get the file compiles=d had encountered the same issues also

IANQIN99 avatar Apr 06 '19 06:04 IANQIN99