Quantcast
Channel: Question and Answer » uart
Viewing all articles
Browse latest Browse all 57

TM4C129 Launchpad and XBee

$
0
0

I am using TM4C129 Launchpad launchpad and trying to connect XBee Series 2 (S2C) through UART.

Looking into the pinout of TM4C129, I am connecting like below

XBee TX <—> RX

XBee RX <—> TX

XBee 3.3V <—> pin#41

XBee GND <—> pin#62

I use below code on the LaunchPad at Energia

void setup()
{
  Serial.begin(9600);
  //pinMode(13, OUTPUT);   
}


void loop()
{
  Serial.println('H');
  delay(1000);
  Serial.println('L');
  delay(1000);

}

And the below python code runs on my Mac as a coordinator

#!/usr/bin/python
import serial

ser = serial.Serial('/dev/tty.usbserial-A104IC2U', 9600)

while True:
        incoming = ser.readline().strip()
        print '%s' % incoming

But it doesn’t work. FYI, this code worked on Arduino.

Has anyone tried this before? Any suggestion?
Am I missing some connection? jumper settings? Anything on the code?


Viewing all articles
Browse latest Browse all 57

Trending Articles