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

Bluetooth, XBee, RF......

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

Postby JayJoe » Fri May 17, 2019 4:48 pm

I've having a huge headache with this module...

Coding for transmitter + Arduino Uno 1
Code: Select all
#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
#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?
JayJoe
Novice
 
Posts: 23
Joined: Thu Nov 09, 2017 4:52 pm

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

Postby ober » Fri May 24, 2019 5:38 am

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.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1436
Joined: Wed Apr 15, 2009 1:03 pm


Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 5 guests

cron