Help adding and RF Remote

Hello,
I have an Arduino nano controlling some lights on and off and I want to add a 2 button RF remote such as this: I want to add a 2 button RF remote control like this https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjW6eOFwdX_AhUSm4kEHapfAa8QFnoECBYQAQ&url=https%3A%2F%2Fwww.amazon.com%2FQIACHIP-DC3-6-24V-Remote-Control-Switch%2Fdp%2FB09BQM41LK&usg=AOvVaw0C1UrCLbTdrRQROWltgSyt&opi=89978449

But I want the remote only to set a flag in the code and let the existing code and switches control the lights. I don’t want the lights wired to the receiver for power.

I plan to use one button (ON) for one set of decisions and the other (OFF) for another set of decisions. I won’t be using the remote to directly turn things on and off.

I’m sure someone already has a wiring diagram and some code. If so, please pass it my way. Thank you!

Can you post the "existing code", please?

Something like this?

if (digitalRead(remote_pin) == HIGH) flag = 1;

Nothing wrong in being an optimist.... Just wait and see.

Exiting code wouldn’t help much.
I’m really looking for how to wire up the receiver and how to detect which button was pushed. (Momentary toggle only). From there I can figure out the rest

The remote you chose and linked to has a SINGLE relay that the two buttons control. On and off. But what you describe has TWO relays and the FOB still has TWO buttons. I don't see how anyone would ever build such a remote device.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.