I'm new to Arduino development. I use Arduino Nano v3 ATmega328P (Old Bootloader). I assembled 2 small boards, one of which is a transmitter with three buttons, and the second is a receiver with three LEDs. But neither the receiver nor the transmitter work.
I tried to transmit signals to the transmitter with flipper zero at 433.92 and 433.88 MHz literally very close to the module, but it just doesn't see the signal and ignores it.
I also tried to receive signals from the FS1000A module on the flipper zero and through the MX-RM-5V module, but again, the flipper does not see the signal nearby even in Raw mode.
I read that for long-range operation of modules they need something like an antenna 69.23 / 4 ≈ 17.3 cm long, but as I know, the module itself should work at a distance of 15-20 cm without an additional antenna.
Can anyone tell me what's wrong and why the modules don't work? Can someone provide a working example code for the transmitter and receiver?
If you think that the code is not the problem and that the frequency of the module is correct,
what we have left? Incorrect wiring or non-working module.
I'm already using another code from the article above with TX and RX pins.
Transmitter:
#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile
RH_ASK driver;
void setup()
{
Serial.begin(9600); // Debugging only
if (!driver.init())
Serial.println("init failed");
}
void loop()
{
const char *msg = "Hello World!";
driver.send((uint8_t *)msg, strlen(msg));
driver.waitPacketSent();
delay(1000);
}
Receiver:
#include <RH_ASK.h>
#include <SPI.h> // Not actualy used but needed to compile
RH_ASK driver;
void setup()
{
Serial.begin(9600); // Debugging only
if (!driver.init())
Serial.println("init failed");
}
void loop()
{
uint8_t buf[12];
uint8_t buflen = sizeof(buf);
if (driver.recv(buf, &buflen)) // Non-blocking
{
int i;
// Message with a good checksum received, dump it.
Serial.print("Message: ");
Serial.println((char*)buf);
}
}
I don't know what to suggest anymore...
Check the frequency written on the crystal of the transmitter.
Try again with flipper if it can detect it.
Buy new modules. https://aliexpress.com/item/1005006153011303.html