Go Down

Topic: Monitoring serial from Xbee receiving data (Read 406 times) previous topic - next topic

kreeve

My set up.
1 Xbee series 1 plugged into xbee shield on arduino.
1 xbee series 1 plugged into xbee explorer USB  (Sparkfun)

So arduino sketch is the following.
void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.print('X');
  delay(2000);

  Serial.print('L');
  delay(2000);
}

I can monitor the data received with the xbee/explorer using a terminal program, it works just fine.  I see XLXLXLXLXL  as it receives it.  No Problem

Now if I change the following line in the sketch

Serial.print('X');

To this instead

Serial.print('XI');

I know get a 5 digit number instead of XI when monitoring the received data on the xbee/explorer using the terminal program. 

So what am I missing here, and how can I send more than one ascii character at a time?  Is it a setting on the xbee receive module?

New to xbee and serial communications with it.


spatula

Code: [Select]

Serial.print("XI");


It's a C syntax rule: single quotes are for characters, double quotes for strings.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy