Page 1 of 1

Two 433Mhz (1km) Modules and Two Arduino UNO

PostPosted: Fri May 17, 2019 4:48 pm
by JayJoe
I've having a huge headache with this module...

Coding for transmitter + Arduino Uno 1
CODE: SELECT_ALL_CODE
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); //rx, tx

void setup()
{
  mySerial.begin(9600);
}

void loop()
{
  mySerial.print("hi");
  delay(1000);
}


Coding for receiver + Arduino Uno 2
CODE: SELECT_ALL_CODE
#include <SoftwareSerial.h>
SoftwareSerial mySerial(3, 4); //rx, tx

void setup()
{
  Serial.begin(9600);
  mySerial.begin(9600);
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
}

void loop()
{
  if(mySerial.available())
  {
    digitalWrite(13, HIGH);
    delay(1000);
    }
else
{
  digitalWrite(13, LOW);
}
 

}


The result? I'm getting no response at all. The connections all are correct. I intend to use Arduino Mega at first, but I saw a lot of people saying it's not compatible with hardware serial. Hmm, is there any more organized tutorial available out there?

Re: Two 433Mhz (1km) Modules and Two Arduino UNO

PostPosted: Fri May 24, 2019 5:38 am
by ober
Personally, I will not setup whole system at once. Normally I will develop subsystem and verify it. In your case, I would directly connect transmitter to receiver, bypassing the RF module, look at the output on receiver. If it works, then only proceed to next step. And for next step, I would again verify the RF module itself, can it send and receive wireless data. Use Arduino as USB to UART, transmit data on computer. Same for the receiver site, use Arduino as USB to UART, receive and look at the data coming it. After verification of RF module can transmit and receive wireless data accordingly, then only connect Arduino and RF module as wanted and load the program.