RF MODULE

TINKS028

  1. An RF module (radio frequency module) is a (usually) small electronic device used to transmit and/or receive radio signals between two devices.
  2. In an embedded system it is often desirable to communicate with another device wirelessly.
Features:-
  1. Easy to use.

TX:

  1. Power supply and/or modulation input voltage: 2.2 to 5.5v.
  2. Operating temperature: -40 to +80C.

RX:

  1. Power supply and/or modulation input voltage: 5v.
  2. Operating temperature: -20 to +80C.
  3. Output:- Analog and Digital
Applications:-
  1. Vehicle monitoring.
  2. Radio tags reading.
  3. Wireless fire protection systems.
  4. Digital home automation.

    RECEIVER:-

int rfReceivePin=A0; //RF Receiver pin = Analog pin 0


unsigned int data = 0; // variable used to store received data
const unsigned int upperThreshold = 70; //upper threshold value
const unsigned int lowerThreshold = 50; //lower threshold value

void setup(){

Serial.begin(9600);
}

void loop(){
data=analogRead(rfReceivePin); //listen for data on Analog pin 0

if(data>upperThreshold){
Serial.println(data);
}

if(data<lowerThreshold){
Serial.println(data);
}
}

TRANSMITTER:-

int rfTransmitPin=4; //RF Transmitter pin = digital pin 4

void setup(){
pinMode(rfTransmitPin, OUTPUT);

}

void loop(){
for(int i=4000; i>5; i=i-(i/3)){
digitalWrite(rfTransmitPin, HIGH); //Transmit a HIGH signal
Serial.println("data transmit");
delay(2000); //Wait for 2 second

digitalWrite(rfTransmitPin,LOW); //Transmit a LOW signal
Serial.println("transmitter is not working");
delay(i); //Variable delay
}
}