Help: 433MHz RF (UART) Transceiver Module-1km(Transmitting)

Bluetooth, XBee, RF......

Help: 433MHz RF (UART) Transceiver Module-1km(Transmitting)

Postby Wee Kiat » Wed Feb 11, 2015 1:26 pm

Hi all, i have doubts on the 433MHz RF (UART) Transceiver Module-1km. I bought 1 pairs months ago and i so far tested works with receiving datas, strings from arduino to my PC but i got problem in sending characters & numbers from PC to my arduino wirelessly with softwareSerial. I tried few ways but i cant send a single thing but receiving is ok. Is there any guidelines or solutions?
Wee Kiat
Greenhorn
 
Posts: 2
Joined: Wed Feb 11, 2015 1:21 pm

Re: Help: 433MHz RF (UART) Transceiver Module-1km(Transmitti

Postby ober » Wed Feb 11, 2015 10:16 pm

Can you share the hardware setup with us and also the sketch?
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Help: 433MHz RF (UART) Transceiver Module-1km(Transmitti

Postby Wee Kiat » Thu Feb 12, 2015 10:51 am

// Basically im doing motor controlling via PWM .

CODE: SELECT_ALL_CODE
#include <SoftwareSerial.h>
SoftwareSerial wifi(19,18);
void setup()
{
  wifi.begin(9600);
  Serial.begin(9600); 
  delay(1000); 
  Serial.println("Initialize");
  wifi.println("Initialize");
  delay(3000);
}

void loop()
{
  if (wifi.available()>0)
 {
   char mode = Serial.write(wifi.read());
   if (mode=='@')
   {
     while (Serial.available()<5);
     int target=Serial.write(wifi.read()-'0');
     int a4=Serial.write(wifi.read()-'0');
     int a3=Serial.write(wifi.read()-'0');
     int a2=Serial.write(wifi.read()-'0');
     int a1=Serial.write(wifi.read()-'0');
     int val_speed= a1+a2*10+a3*100+a4*1000;
     if (target==1) analogwrite(2, (val_speed));
     if (target==1) analogwrite(3, (val_speed));
     if (target==1) analogwrite(4, (val_speed));
     if (target==1) analogwrite(5, (val_speed));
     wifi.print("sent value = ");

     wifi.print(val_speed);

     wifi.print(" to target ");

     wifi.println(target);
    }
}
}

#########################################################################################################
for the RF transceiver i only connect these ports.

Ardu-Mega RF Transciever RF transceiver via UC00A PC
5v-------------------------------------- Vin
Ground--------------------------------- Ground
TX3------------------------------------- RX
RX3------------------------------------- TX
Attachments
cytron.png
Wee Kiat
Greenhorn
 
Posts: 2
Joined: Wed Feb 11, 2015 1:21 pm

Re: Help: 433MHz RF (UART) Transceiver Module-1km(Transmitti

Postby ober » Thu Feb 12, 2015 1:20 pm

Weird, your connection is using UART3 (pin 14 and 15), but your sketch show software serial with pin 18 and 19? Is this the right sketch and schematic? Pin 18 and 19 is UART1, it is hardware UART too.

Since is it hardware UART, you do not need to use software serial. Use Serial1 (for pin 18 & 19), or Serial3 (for pin 14 & 15).

Check more under Arduino official page: Serial
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm


Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 3 guests

cron