lilyhack 3 Posted April 22, 2016 Share Posted April 22, 2016 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 (UART0) XBee RX <---> TX (UART0) 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? Quote Link to post Share on other sites
Rei Vilo 695 Posted April 22, 2016 Share Posted April 22, 2016 Which UART port are you using? You should specify it as the TM4C129 features 8 ports. Quote Link to post Share on other sites
lilyhack 3 Posted April 22, 2016 Author Share Posted April 22, 2016 Which UART port are you using? You should specify it as the TM4C129 features 8 ports. UART0 Quote Link to post Share on other sites
dubnet 238 Posted April 23, 2016 Share Posted April 23, 2016 You may want to try using Serial1 (e.g. Serial1.begin) instead of Serial and make your connections to RX1 and TX1. The first serial port on the launchpads is usually tied to the programming portion of the board and is used for as the backchannel serial port for terminal output. energia 1 Quote Link to post Share on other sites
lilyhack 3 Posted April 23, 2016 Author Share Posted April 23, 2016 Not sure how to use UART1 but I used UART3 and used Serial3 in the code and it worked. Thanks. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.