Help with RF transmitter code

I am making a project and I am making three LED's blink. One blinks while one button is being pressed, another blinks when another button is pressed, and the third one stays on while both buttons are being pressed at the same time. My code works, but I would like to attach an RF transmitter and receiver to the buttons to make them wireless. Could someone please help me with the code on this?

const int ledPin= 13;
const int led1Pin= 12;
const int led2Pin= 11;
const int buttonPin= 2;
const int button1Pin= 3;
 
 
 int buttonState= 0;
 int button1State= 0;
 
 
 
 
 
 
 void setup()
 {
   pinMode(buttonPin, INPUT);
   pinMode(button1Pin, INPUT);
   pinMode(ledPin,OUTPUT);
   pinMode(led1Pin,OUTPUT);
   pinMode(led2Pin,OUTPUT);
 }
 
 void loop()
 {
   buttonState= digitalRead(buttonPin);
 button1State= digitalRead(button1Pin);
 
 
 if(buttonState==LOW && button1State==LOW)
   {
   digitalWrite(ledPin,LOW);
   digitalWrite(led1Pin,LOW);
   digitalWrite(led2Pin,LOW);
 }
   
   
   
   if(buttonState==HIGH && button1State==HIGH)
   {
   digitalWrite(led1Pin,HIGH);}
   
   
   if(buttonState==HIGH && button1State==LOW)
   {digitalWrite(ledPin, HIGH);
   delay(175);
   digitalWrite(ledPin,LOW);
   delay(175);}
   
   if (buttonState==LOW && button1State==HIGH)
   {digitalWrite(led2Pin,HIGH);
   delay(175);
   digitalWrite(led2Pin,LOW);
   delay(175);}

 }

Without knowing the wireless units being used, no.

Weedpharma

You could do this with hardware fairly easily with something like this.
http://www.aliexpress.com/item/Higher-Quality-4-Channel-RF-Wireless-Remote-Control-Module-2262-2272-Four-Ways-Wireless-Remote-Controler/32303499552.html

The only possible downside is that some of these remotes cant handle the combination of multiple buttons pressed at once.
The encoder chip in the remote can though, so even if the remote doesnt work, all you need is a SC2262 encoder and a cheap 433 Mhz ASK transmitter.

weedpharma:
Without knowing the wireless units being used, no.

Weedpharma

What does that mean?

Hi,

Yes you can do that, but we need more info to help you with any suggestions about programming.
Do you have an Tx and Rx in mind.
What range do you need?

Tom.... :slight_smile:

adasborowczak:
What does that mean?

We need to know what RxTx you are using as code is different for each.

Give a link to the tranceiver you are using.

Weedpharma