sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.93k stars 663 forks source link

Added protocol for Mertik Maxitrol G6R-H4T1 #287

Closed pkozul closed 5 years ago

pkozul commented 5 years ago

Tested on ESP8266 using following code:

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(57600);

  mySwitch.enableTransmit(4);

  mySwitch.setProtocol(31);
}

void loop() {
  delay(10000);

  Serial.print(F("Sending ON..."));
  Serial.println();
  mySwitch.setRepeatTransmit(80);
  mySwitch.send("010011110011");
  delay(30000);

  Serial.print(F("Sending OFF..."));
  Serial.println();
  mySwitch.setRepeatTransmit(10);
  mySwitch.send("010011110111");
}