Trying to build some low-power code between two nodes. Here's the relevant parts of the sketch:
#define RF69_LISTENMODE_ENABLE //comment this line out to compile sketches without the ListenMode (saves ~2k)
#include <RFM69.h> //get it here: https://github.com/lowpowerlab/RFM69
#include <RFM69_OTA.h> //get it here: https://github.com/lowpowerlab/RFM69
#include <SPIFlash.h> //get it here: https://github.com/lowpowerlab/spiflash
#include <SPI.h> //included with Arduino IDE install (www.arduino.cc)
...
#define IS_RFM69HW_HCW //uncomment only for RFM69HW/HCW! Leave out if you have RFM69W/CW!
//*****************************************************************************************************************************
//#define ENABLE_ATC //comment out this line to disable AUTO TRANSMISSION CONTROL
...
#ifdef ENABLE_ATC
RFM69_ATC radio;
#else
RFM69 radio;
#endif
#define RECEIVER 3
...
void loop(){
...
// If button is being pressed, light up the LED
if (buttonState == LOW)
{
if (!flag)
{
Serial.println("ButtonPressed!");
flag=1;
tone(BUZZER_PIN, BUZZER_FREQ, BUZZER_DURATION);
Serial.print("Sending wakeup burst...");
radio.listenModeSendBurst((uint8_t)RECEIVER, (void *)"w", (uint8_t)1);
bool replied = false;
long start = millis();
while (millis() - start < BURST_REPLY_TIMEOUT_MS) {
if (radio.receiveDone()) {
Serial.println("Success");
replied = true;
break;
}
}
...
} // loop()
Unfortunately, when I try to compile (using the Ardiono IDE) I get the following error message:
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759/Button.ino.elf" "C:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759\\sketch\\Button.ino.cpp.o" "C:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759\\libraries\\RFM69_LowPowerLab\\RFM69.cpp.o" "C:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759\\libraries\\RFM69_LowPowerLab\\RFM69_ATC.cpp.o" "C:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759\\libraries\\RFM69_LowPowerLab\\RFM69_OTA.cpp.o" "C:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759\\libraries\\SPIFlash_LowPowerLab\\SPIFlash.cpp.o" "C:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759/core\\core.a" "-LC:\\Users\\parents\\AppData\\Local\\Temp\\arduino_build_270759" -lm
C:\Users\parents\AppData\Local\Temp\arduino_build_270759\sketch\Button.ino.cpp.o: In function `loop':
D:\Users\parents\Documents\Development\Arduino\XBoxNotifier\Button/Button.ino:194: undefined reference to `RFM69::listenModeSendBurst(unsigned char, void*, unsigned char)'
collect2.exe: error: ld returned 1 exit status
Using library RFM69_LowPowerLab at version 1.2.0 in folder: D:\Users\parents\Documents\Development\Arduino\libraries\RFM69_LowPowerLab
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Using library SPIFlash_LowPowerLab at version 101.1.2 in folder: D:\Users\parents\Documents\Development\Arduino\libraries\SPIFlash_LowPowerLab
exit status 1
Error compiling for board Moteino / MoteinoUSB.
I have tried all sorts of type casting on the parameters in the listenModeSendBurst() call, I've deleted the temp cache directories & recompiled, any anything else I can think of. The RFM69.h & .ccp files have the function calls in there:
//=============================================================================
// sendBurst() - send a burst of packets to a sleeping listening node (or all)
//=============================================================================
void RFM69::listenModeSendBurst( uint8_t targetNode, void* buffer, uint8_t size )
{
and
void listenModeSendBurst(uint8_t targetNode, void* buffer, uint8_t size);
I'm not sure how the IDE is picking up a reference to "RFM69::listenModeSendBurst(unsigned char, void*, unsigned char)" or why it's not accepting my call in the sketch. I couldn't find any reference to this on the Forum or through a Google search. I'm 99.99% sure there some small error I've made that explains this, but for the life of me I can't find what it is.
Any suggestions would be greatly appreciated. Thanks in advance.