ADAFRUIT MTK3339 GPS SHIELD with XBEE

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
hujitsu
 
Posts: 14
Joined: Thu Mar 23, 2017 12:38 am

ADAFRUIT MTK3339 GPS SHIELD with XBEE

Post by hujitsu »

Hi, for my project I am trying to transmit raw NMEA sentences wirelessly via Xbee.
For my setup I am using an ultimate GPS logger shield, and a Xbee s1 with a breakout board.

https://www.adafruit.com/products/1272

https://www.sparkfun.com/products/11215

Since the default tx, rx pins are at (8, 7) do I just connect my Xbee DOUT pin to 7, and my DIN pin to 8?

Here is the code I am using, I just modified the tutorial from sparkfun

Code: Select all

/*****************************************************************
XBee_Serial_Passthrough.ino

Set up a software serial port to pass data between an XBee Shield
and the serial monitor.

Hardware Hookup:
  The XBee Shield makes all of the connections you'll need
  between Arduino and XBee. If you have the shield make
  sure the SWITCH IS IN THE "DLINE" POSITION. That will connect
  the XBee's DOUT and DIN pins to Arduino pins 2 and 3.

*****************************************************************/
// We'll use SoftwareSerial to communicate with the XBee:
#include <SoftwareSerial.h>
// XBee's DOUT (TX) is connected to pin 7 (Arduino's Software RX)
// XBee's DIN (RX) is connected to pin 8 (Arduino's Software TX)
SoftwareSerial XBee(8, 7); // RX, TX

void setup()
{
  // Set up both ports at 9600 baud. This value is most important
  // for the XBee. Make sure the baud rate matches the config
  // setting of your XBee.
  XBee.begin(9600);
  Serial.begin(9600);
}

void loop()
{
  if (Serial.available())
  { // If data comes in from serial monitor, send it out to XBee
    XBee.write(Serial.read());
  }
  if (XBee.available())
  { // If data comes in from XBee, send it out to serial monitor
    Serial.write(XBee.read());
  }
}

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: ADAFRUIT MTK3339 GPS SHIELD with XBEE

Post by Franklin97355 »

What Arduino are you plugging the shield into?

User avatar
hujitsu
 
Posts: 14
Joined: Thu Mar 23, 2017 12:38 am

Re: ADAFRUIT MTK3339 GPS SHIELD with XBEE

Post by hujitsu »

I am using an uno

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: ADAFRUIT MTK3339 GPS SHIELD with XBEE

Post by Franklin97355 »

Since the default tx, rx pins are at (8, 7) do I just connect my Xbee DOUT pin to 7, and my DIN pin to 8?
No, you need to connect DOUT to the RX pin and DIN to the TX pin

User avatar
hujitsu
 
Posts: 14
Joined: Thu Mar 23, 2017 12:38 am

Re: ADAFRUIT MTK3339 GPS SHIELD with XBEE

Post by hujitsu »

Ok I will try that. Thank you!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”