En fait le bon code c'est celui là :
#include <avr/wdt.h>
#include <SomfyRTS.h>
SomfyRTS myRTS(3, TSR_RFM69); //Tx pin number, transmitter type
//pin number : pin connected to the transmitter DATA pin or to the DIO2 pin on RFM69
//transmitter type can be TSR_RFM69 or TSR_AM (for a generic AM 433.42MHZ transmitter)
void setup() {
//myRTS.configRTS(myEEPROM_address, myRTS_address); //uncomment and change values only if you don't want to use default configuration
myRTS.setHighPower(true); //have to call it after initialize for RFM69HW
pinMode(7, INPUT_PULLUP);
pinMode(8, INPUT_PULLUP);
}
void loop() {
if (digitalRead(7) == LOW)
{
myRTS.sendSomfy(3, DOWN); // remote 0, down
delay(300);
//myRTS.setHighPower(false);
redemarre_arduino();
}
if (digitalRead(8) == LOW)
{
myRTS.sendSomfy(3, UP); // remote 0, up
delay(300);
//myRTS.setHighPower(false);
redemarre_arduino();
}
}
void redemarre_arduino(){
wdt_enable(WDTO_15MS);
while(1){
}
}