sagar saini
Published © GPL3+

Digital Transmitter and Receiver 433Mhz

A fully secure receiver and transmitter pair works on radio frequency, Control the things wirelessly without internet, Wifi and bluetooth.

IntermediateFull instructions provided1.5 hours134
Digital Transmitter and Receiver 433Mhz

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DFRobot Transmitter and Receiver Pair
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Custom parts and enclosures

Gerber Shield PCB for Tranmitter

Schematics

TX Onboard circuit

RX onboard circuit

Transmitter Remote Control Shield Circuit

Code

Pairing TX

Arduino
#define Button_D2 2  //Arduino

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(Button_D2, HIGH);
  delay(1000);
  digitalWrite(Button_D2, LOW);
  delay(1000);
}

Pairing Rx

Arduino
#define Button_D2 2 //Arduino


void setup() {
    Serial.begin(115200);
    pinMode(Button_D2, INPUT);
}
void loop() {
    if (digitalRead(Button_D2)) {
        Serial.println("PressedD2");
        delay(1000);
    }
}

Main Reciver code

Arduino
#define Button_D2 2//Arduino
#define Button_D3 3//Arduino
#define Button_D4 4//Arduino
#define Button_D5 5//Arduino

void setup() {
  Serial.begin(115200);
  pinMode(Button_D2, INPUT);
  pinMode(Button_D3, INPUT);
  pinMode(Button_D4, INPUT);
  pinMode(Button_D5, INPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
}
void loop() {
  if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==0))) {
    Serial.println("State:0");
    digitalWrite(6, LOW);
    digitalWrite(7, LOW);
    digitalWrite(8, LOW);
    digitalWrite(9, LOW);
    delay(500);
  }
    if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==1))) {
    Serial.println("State:1");
    digitalWrite(6, HIGH);
    digitalWrite(7, LOW);
    digitalWrite(8, LOW);
    digitalWrite(9, LOW);
    delay(500);
  }
    if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==0))) {
    Serial.println("State:2");
    digitalWrite(6, LOW);
    digitalWrite(7, HIGH);
    digitalWrite(8, LOW);
    digitalWrite(9, LOW);
    delay(500);
  }
     if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==0))) {
    Serial.println("State:4");
    digitalWrite(6, LOW);
    digitalWrite(7, LOW);
    digitalWrite(8, HIGH);
    digitalWrite(9, LOW);
    delay(500);
  }
    if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==0))) {
    Serial.println("State:8");
    digitalWrite(6, LOW);
    digitalWrite(7, LOW);
    digitalWrite(8, LOW);
    digitalWrite(9, HIGH);
    delay(500);
  }
    if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==1))) {
    Serial.println("State:3");
    digitalWrite(6, HIGH);
    digitalWrite(7, HIGH);
    digitalWrite(8, LOW);
    digitalWrite(9, LOW);
    delay(500);
  }
     if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==1))) {
    Serial.println("State:5");
    digitalWrite(6, HIGH);
    digitalWrite(7, LOW);
    digitalWrite(8, HIGH);
    digitalWrite(9, LOW);
    delay(500);
     }
    if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==0))) {
    Serial.println("State:6");
    digitalWrite(6, LOW);
    digitalWrite(7, HIGH);
    digitalWrite(8, HIGH);
    digitalWrite(9, LOW);
    delay(500);
     }
    if (((digitalRead(Button_D5)==0) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==1))) {
    Serial.println("State:7");
    digitalWrite(6, HIGH);
    digitalWrite(7, HIGH);
    digitalWrite(8, HIGH);
    digitalWrite(9, LOW);
    delay(500);
     }
    if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==1))) {
    Serial.println("State:9");
    digitalWrite(6, HIGH);
    digitalWrite(7, LOW);
    digitalWrite(8, LOW);
    digitalWrite(9, HIGH);
    delay(500);
     }
    if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==0))) {
    Serial.println("State:10");
    digitalWrite(6, LOW);
    digitalWrite(7, HIGH);
    digitalWrite(8, LOW);
    digitalWrite(9, HIGH);
    delay(500);
     }
    if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==0) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==1))) {
    Serial.println("State:11");
    digitalWrite(6, HIGH);
    digitalWrite(7, HIGH);
    digitalWrite(8, LOW);
    digitalWrite(9, HIGH);
    delay(500);
     }
    if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==0))) {
    Serial.println("State:12");
    digitalWrite(6, LOW);
    digitalWrite(7, LOW);
    digitalWrite(8, HIGH);
    digitalWrite(9, HIGH);
    delay(500);
     }

     if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==0)&& (digitalRead(Button_D2)==1))) {
    Serial.println("State:13");
    digitalWrite(6, HIGH);
    digitalWrite(7, LOW);
    digitalWrite(8, HIGH);
    digitalWrite(9, HIGH);
    delay(500);
     }
     if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==0))) {
    Serial.println("State:14");
    digitalWrite(6, LOW);
    digitalWrite(7, HIGH);
    digitalWrite(8, HIGH);
    digitalWrite(9, HIGH);
    delay(500);
     }
    if (((digitalRead(Button_D5)==1) && (digitalRead(Button_D4)==1) && (digitalRead(Button_D3)==1)&& (digitalRead(Button_D2)==1))) {
    Serial.println("State:15");
    digitalWrite(6, HIGH);
    digitalWrite(7, HIGH);
    digitalWrite(8, HIGH);
    digitalWrite(9, HIGH);
    delay(500);
     }
   
  delay(100);
}

Credits

sagar saini

sagar saini

78 projects • 80 followers
I am Sagar Saini an electronic hardware enthusiast

Comments