433Mhz RF Link Kit with jolly-open 4

Hello,

I’m doing a project with the 433Mhz RF Link Kit, I need to code a universal remote (the jolly-open 4) but I don’t how to code the transmettor and after that duplicate it with my remote, I need to code 3 buttons to Schedule a gate, one button to open, one to close and one for a pedestrian mode. I succeeded to acquire signal on the receiver thanks to the remote with the VirtualWire Library. Sorry for my english I’m French :sweat_smile: . thank you in advance for your reply !

Hi @alexandre1, Great, This will be a nice project! what help you exactly need!

Hi @salman !

I’ve advenced a little bit, I have two Arduino, one Nano for the transmittor and a Mega 2560 for the receiver, I want to know how send different message with the different remote’s buttons, this is my remote:

https://www.amazon.co.uk/XuBa-Universal-Wireless-Cloning-Electric/dp/B07H7L8DDT/ref=sr_1_6?crid=3KQNXLGVBZF9U&dchild=1&keywords=universal+radio+remote+control&qid=1592381683&sprefix=universal+radio+%2Caps%2C189&sr=8-6

If I understood correctly, I must put a code on the transmitter, copy it to my remote control, and therefore on each button there will be a different code, with the rc_switch library I managed to establish a connection between the 2. here are my 2 codes:

TRANSMITTOR:
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {

Serial.begin(9600);

// Transmitter is connected to Arduino Pin #10
mySwitch.enableTransmit(10);

// Optional set pulse length.
mySwitch.setPulseLength(276);

// Optional set number of transmission repetitions.
mySwitch.setRepeatTransmit(15);

}

void loop() {

/* Same switch as above, but using binary code */
mySwitch.send(“101100001101111001000100”);
delay(1000);
}

RECEIVER:
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0); // Receiver on interrupt 0 => that is pin #2
}

void loop() {
if (mySwitch.available())
{
output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());
mySwitch.resetAvailable();
}
}

And this is my external output:

So I want to know how do different action, and THANK YOU very much for your quick reply !!

Hi Thanks for the detailed explanation, You need to send data between Transmitter Arduino node to the Receiver Arduino node right? for that, you can refer the example from sparkfun , and if you also want work with the remote from amazon, you first need to know the data it’s transmitted when a key pressed then according to that you can make some conditional statement in Arduino sketch.

let me know your thoughts. :slightly_smiling_face:

yes you’re right, I need to control a gate with a remote, but at first I need to create a code and copy it on my remote, but I don’t understand the exemple form sparkfun, I have already seen it before but when I put the Arduino code in the receiver and press key nothing is happening :confused: :sob:

No worries, you can try to follow this Complete Guide for RF 433MHz Transmitter/Receiver Module With Arduino tutorial by Randomnerdtutorials (https://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/)

In here they mentioned everything clearly. Please let me know after checking this.

1 Like

Oh thanks! Now when press a button I can see this:
Captureû

But it work with only 2 buttons ( A and B) but I think that is a problem of dupplication :wink:

If it’s not too much, do you know how to put a code on a specific button, for example replace “Hello World” with “A” and put it on the A button, but in any case thank you very much for all links :pray: :smile:

Good to see it’s working :slightly_smiling_face: :+1: . happy making.

you can have multiple buttons with the conditional statement, for example

#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile

RH_ASK driver;

void setup()
{
  Serial.begin(9600);    // Debugging only
  if (!driver.init())
    Serial.println("init failed");
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);

}

void loop()
{
  char buttonA = "A"; // Button A Key value
  char buttonB = "B"; // Button B Key value
  if (digitalRead(button1 == HIGH) {
  driver.send((uint8_t *)buttonA, strlen(buttonA));
    driver.waitPacketSent();
    delay(1000);
  }
  else if (digitalRead(button2 == HIGH) {
  driver.send((uint8_t *)buttonB, strlen(buttonB));
    driver.waitPacketSent();
    delay(1000);
  }

}
1 Like

Thank you very very much it working !!

Great :star_struck: :love_you_gesture:

1 Like