sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silly Question about Sending with SetProtocol(6)

WagnerDeQueiroz opened this issue · comments

I need create a Garage door extender and I have a problem sending using the Protocol 6.
My setup is:
Sender: Arduino Uno with FS1000A
Receiver: TTGO ESP32 LILYGO TCALL with MX-RM-5V (working)
running ReceiveDemo_Simple

Using on receiver on ESP32 I got this reading using any of my (garage Door opening) remote controls...

Received: 202212404 / 28bit Protocol: 6,  delay is : 501
Received: 202215601 / 28bit Protocol: 6,  delay is : 503
Received: 202211407 / 28bit Protocol: 6,  delay is : 501
Received: 202213033 / 28bit Protocol: 6,  delay is : 503
Received: 202272129 / 28bit Protocol: 6,  delay is : 503

I have some remotes what uses Protocol 6 here my control board don´t have more space to more controls. I use a Arduino to adopt more controls but the RC-Switch can read any remote control, but I created a sender using this protocol and my receiver board don't receive nothing. I want to known where is my mistake.

look my code...

#include<Arduino.h>
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableTransmit(10); //DATA PIN 10   
  mySwitch.setProtocol(6);
  mySwitch.setPulseLength(503);
}

void loop() {  
  const char* mycode = "202212404";
  Serial.print("sending code:");
  Serial.print( mycode);
  mySwitch.send(mycode, 28);
  delay(1000);  
  
  Serial.println(" wait 5 seconds");
  delay(5000);
} 

ArduinoUno