Go Down

Topic: RX receive always -1 in RF communication (Read 1 time) previous topic - next topic


Jun 18, 2011, 06:39 am Last Edit: Jun 18, 2011, 06:46 am by kty1104 Reason: 1

I stuck at RF communication between 2 arduino for several days

RX always tell me that RX recieved nothing (-1)

I experiment several things.

1. is it NewSoftSerial's fault?
   I don't think so,
   because when I wire the Reciever's RX pin and Tranciever's TX pin,
   both of two can communicate very well
   RX recieve 255 when sending 255 in TX side.

2. is it RF module's fault?
   when TX module's Data In pin is connected logical HIGH,
   RX Module's Data Out pin is cycling among logical 1, 1, 0, 0, 1, 1, 0, 0...
   so.. I don't think so

3. is it power supply issue?
   I connect both of TX and RX to 5v which is streamming from arduino UNO, Pro mini respectively
   and product info says TX's and RX's voltage range is 3~12v, 4.5~5.5v respectively

4. is it source code problem?
   TX side code is here
   #include <NewSoftSerial.h>
   NewSoftSerial RF(13,11);//RX,TX
   void setup(){RF.begin(2400);}
   void loop(){RF.print(255,BYTE);}

   and RX side code is here
   #include <NewSoftSerial.h>
   NewSoftSerial RF = NewSoftSerial(14,11);//RX,TX
   void setup(){RF.begin(2400);Serial.begin(2400);}
   void loop(){Serial.println(RF.read());}
5. is it antenna issue?
   product info says it's ok to connect antenna 30~35cm long
   and I connect it as like it(though it is just wire)   

could somebody help me?
I attach the arduino UNO and Pro mini's picture as well

(since someone says that my question is too vague and unreadable,
I try write it down as readable as I can,
but I am a beginner, so it could be still vague and unreadable,
if you point my writing mistake out(instead of just saying "it's too vague"), it would be greatly helpful)

thanks for reading


Go Up