Arduino to Arduino Wireless Communication Telemetry

Hi guys,

I am working on a mini project and I wish to send data from one arduino to another via Telemetry. I am using a Arduino Uno, Freetronics Etherten for the micro controller and a 3DR Radio 915MHz, RFD9000+ for the telemetry.

The telemetry are synced (solid green light and same baud rate of 57600) and I know there is some communication. My simple test is to send a integer value through the Serial from the Uno and save the value onto my Etherten.

The simple transmitter code is shown below, I wish to send the value 500.

void setup()   
{  
  Serial.begin(57600);  
}    
void loop()   
{  
  while(Serial.available()>=0)  
  {
    Serial.println(500);
    delay(5000);  
  }  
}

And my receiver code is

int number = 0;

void setup()   
{  
  Serial.begin(57600); 
}  
void loop()   
{  
while(Serial.available())
{
  number = Serial.parseInt();
  Serial.println(number);
  delay(100);
}
}

I used the Serial monitor for the uno and a open source program called cool-term for my Etherten as a Serial monitor. Now, when I go to the uno Serial monitor and type in for example, 3000 and press enter, it will show up on the cool-term (Etherten Serial monitor) and that's great!. I attached the image below.

Now when I transmit a value for example 500, it does not show up on the receiver Serial monitor unless I manually type it in. Is there a difference between Serial.print/Serial.write and manually pressing in values into the Serial monitor? Or is my approach completely wrong? I am new to program so any help is appreciated. Thanks

Serial.available returns the amount of characters received. Your transmitter doesn't receive anything, so it won't transmit anything, because you only transmit if it received something :wink:

Change transmitter code to:

void loop()
{
    Serial.println(500);
    delay(5000);
}

Also, on the receiver: when you receive a value from the transmitter (Serial), you parse it and print it back to the transmitter. If you want to visualize the received value on coolterm or whatever, you will have to use another Serial port. The Etherten only have one hardware serial port, so you must use the SoftwareSerial library.

Thanks GUIX! I'll give it a try! :slight_smile:

Hey GUIX,

I used the code serial.println (500); to print a value. As I mentioned in the post I have 2 serial monitors open arduino and coolterm. The ardunio serial monitor displays the value 500. However the cool term serial monitor displays nothing. Only when I manually type in the value in the arduino serial monitor does the cool term monitor displays the value.

=/

I figured out the problem. My telemetry were set as marlink and not raw data!.