Image Removed
Receiver Specifications
Detail | Specification | Image |
---|
Product Model | XD-RF-5V | Image Added |
Operating voltage | 5V |
Quiescent Current | 4 mA |
Receiving frequency | 433.92MHZ |
Receiver sensitivity | -105DB |
Pinout from left → right | VCC, DATA,DATA,GND |
Simular Product:
https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=433Mhz+superheterodyne+receiver&_sacat=0
https://www.seeedstudio.com/433MHz-ASK-OOK-Super-heterodyne-Receiver-module-p-2205.html
| Image |
---|
Image Added |
Image Added
|
Transmitter Specifications
Detail | Specification | Image |
---|
Product Model | XD-FST | Image Added |
Launch distance | 20-200 meters (different voltage, different results) |
Operating voltage | 3.5-12V |
Operating mode | AM |
Transfer rate | 4KB / S |
Transmitting power | 10mW |
Transmitting frequency | 433M |
Pinout from left → right | DATA; VCC; GND |
...
A digital 1 turns the carrier on while a digital 0 turns tit off.
Sample Code
Code Block |
---|
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
// ask_transmitter.pde
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module
#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile
//RH_ASK (uint16_t speed=2000, uint8_t rxPin=11, uint8_t txPin=12, uint8_t pttPin=10, bool pttInverted=false)
RH_ASK driver(2000, D2, D1, D6); // ESP8266 or ESP32: do not use pin 11 or 2
//Connect data to pin 5/D1
void setup()
{
Serial.begin(115200);
Serial.println("\n\nRFnrfSender SnifferStarted\n\n");
if (!driver.init()){
mySwitch.enableReceive(0); // Receiver input on interrupt 0 (GPIO 0)
pinMode(LED_BUILTIN, OUTPUT); Serial.println("init failed");
}
//driver.setModeTx();
Serial.println("Initialized");
}
void loop()
{
Serial.println("Sending hello");
const char *msg = "hello";
if (mySwitch.available()) {driver.send((uint8_t *)msg, strlen(msg));
Serialdriver.print("Received ");
Serial.print( mySwitch.getReceivedValue() );
Serial.print("waitPacketSent();
delay(1000);
}
|
Code Block |
---|
// ask_receiver.pde
// -*- mode: C++ -*-
// Simple example of how to use RadioHead to receive messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) receiver with an Rx-B1 module
#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile
//RH_ASK (uint16_t speed=2000, uint8_t rxPin=11, uint8_t txPin=12, uint8_t pttPin=10, bool pttInverted=false)
RH_ASK driver(2000, D1, D2, D6); // ESP8266 or ESP32: do not use pin 11 or 2
//Connect data to pin 5/D1
void setup()
{
/ ");
Serial.printbegin( mySwitch.getReceivedBitlength() );115200);
Serial.printprintln("Bit \n\nrfReceiver Started\n\n");
if (!driver.init()){
Serial.printprintln("init // failed");
}
Serial.printprintln("Protocol: Initialized");
Serial.println( mySwitch.getReceivedProtocol() );
digitalWrite(LED_BUILTIN, HIGH); // Toggle the onboard LED
delay(1);
digitalWrite(LED_BUILTIN, LOW);
mySwitch.resetAvailable();
}
}
}
void loop()
{
uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
uint8_t buflen = sizeof(buf);
if (driver.recv(buf, &buflen)) // Non-blocking
{
// Message with a good checksum received, dump it.
// driver.printBuffer("Got:", buf, buflen);
Serial.print("Message Received: ");
Serial.println((char*)buf);
}
} |
Reference