Pages: [1]   Go Down
Author Topic: Monitoring serial from Xbee receiving data  (Read 335 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
Serial.print("XI");

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

Pages: [1]   Go Up
Jump to: