Alas, I get the following errors when I #include<listen.h).
Arduino 1.6.4 on OSX.
ListenMode branch of RFM69 library.
In file included from /Users/neko/Documents/Arduino/libraries/listen/listen.cpp:1:0:
/Users/neko/Documents/Arduino/libraries/RFM69-ListenMode/RFM69.h: In function 'void irq()':
/Users/neko/Documents/Arduino/libraries/RFM69-ListenMode/RFM69.h:167:18: error: 'virtual void RFM69::select()' is protected
virtual void select();
^
/Users/neko/Documents/Arduino/libraries/listen/listen.cpp:40:20: error: within this context
pRadio->select();
^
Lots of similar errors for unselect() and setMode() as well.
#include <RFM69.h>
#include <SPI.h>
#include <LowPower.h>
#include <listen.h>
// Uncomment the appropriate frequency for your hardware
//#define FREQUENCY RF69_433MHZ
//#define FREQUENCY RF69_868MHZ
#define FREQUENCY RF69_915MHZ
//#define IS_RFM69HW //uncomment only for RFM69HW! Leave out if you have RFM69W!
#define ENCRYPT_KEY "sampleEncryptKey"
#define ADDRESS 2
#define NETWORK_ID 100
Here is the branch of listen mode (https://github.com/LowPowerLab/RFM69/tree/ListenMode), this needs to completely replace RFM69 if you had that installed (ie not side by side, only this one in your arduino/libraries).
Then load these examples:
https://github.com/LowPowerLab/RFM69/tree/ListenMode/Examples/ListenMode_Master
https://github.com/LowPowerLab/RFM69/tree/ListenMode/Examples/ListenMode_Node
The ListenMode branch is installed, replacing RFM69 as you suggest. The ListenMode_Master and ListenMode_Node examples work well together.
The trouble arises when I try to add the listen.h and listen.cpp, which has the nice timed delay function in it. I don't know how to add them without creating these conflicts.
Listen.h and Listen.cpp are from joelucid in reply 13 of this thread (https://lowpowerlab.com/forum/low-power-techniques/using-listenmode-as-wakeup-timer/).
Is there a way to make a delay using the ListenMode branch alone?
joe's version might require the MAIN RFM69 branch but this was posted in september 2015 so since then the library has had some changes, though I don't really expect breaking changes, if the assumption that the RFM69 lib was used is valid. So try his sketch with the MAIN RFM69 branch.
Thanks Felix
I got it working by adapting the relevant bits (delay, delayIrq and endlistener) from joelucid's library and putting them directly into the ListenMode branch of the RFM69 library.
Can I put C++ on my resume now...
Very cool, you sure can !!