Skip to content

zeitgeist87/RFReceiver

Repository files navigation

RFReceiver

433 MHz modules

This is an Arduino library for low-cost 433 MHz receiver modules with a focus on reliable one-way communication and forward error correction. It uses the PinChangeInterruptHanlder library.

The corresponding RFTransmitter library for the 433 MHz transmitter modules can be found here.

Usage

433 MHz module connection

#include <PinChangeInterruptHandler.h>
#include <RFReceiver.h>

// Listen on digital pin 2
RFReceiver receiver(2);

void setup() {
  Serial.begin(9600);
  receiver.begin();
}

void loop() {
  char msg[MAX_PACKAGE_SIZE];
  byte senderId = 0;
  byte packageId = 0;
  byte len = receiver.recvPackage((byte *)msg, &senderId, &packageId);

  Serial.println("");
  Serial.print("Package: ");
  Serial.println(packageId);
  Serial.print("Sender: ");
  Serial.println(senderId);
  Serial.print("Message: ");
  Serial.println(msg);
}

About

An Arduino library for low-cost 433 MHz receiver modules with a focus on reliable one-way communication and forward error correction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages