@evb thanks for your answer. On my arduino pro mini, the red led is not blinking anymore when it occurs (ie I use a node as a door bell, and when I click on the button, when it is working fine the red led blinks when sending data to the gateway). So I would rather bet, arduino failure.
I'm using 3.3V from arduino itself to power the RFM69HW. Is it better to use another source? I will try to power RFM in direct from power source, and will let you know if node still crashes after a couple of days/weeks.
I post below the easiest sketch (door bell) on which I'm suffering those connection losses on, in case you notice something missing or wrong, please let me know, but again this is very basic...
Thanks a lot for your help!
//
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_REPEATER_FEATURE
#define MY_NODE_ID 21
#define MY_RADIO_RFM69
#define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
#define MY_IS_RFM69HW // Omit if your RFM is not "H"
#include <MySensors.h>
#include <Bounce2.h>
#define CHILD_ID 3
#define BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch
#define BUTTON_RESET 4
Bounce debouncer = Bounce();
int oldValue=1;
// Change to V_LIGHT if you use S_LIGHT in presentation below
MyMessage msg(CHILD_ID,V_TRIPPED);
MyMessage msg2(4,V_STATUS);
void setup()
{
// Setup the button
pinMode(BUTTON_PIN,INPUT);
// Activate internal pull-up
digitalWrite(BUTTON_PIN,HIGH);
// digitalWrite(BUTTON_RESET,HIGH);
// After setting up the button, setup debouncer
debouncer.attach(BUTTON_PIN);
debouncer.interval(5);
}
void presentation() {
sendSketchInfo("Sonette", "1.0");
present(CHILD_ID, S_DOOR);
}
void loop()
{
debouncer.update();
// Get the update value
int value = debouncer.read();
if (value != oldValue) {
// Send in the new value
send(msg.set(value==HIGH ? 1 : 0));
oldValue = value;
}
}
void receive(const MyMessage &message)
{
if (message.sensor == 4) {
Serial.print(" reset");
pinMode(BUTTON_RESET,OUTPUT);
digitalWrite(BUTTON_RESET,LOW);
}
}