arduino serial port TX/RX and USB

Status
Not open for further replies.

lignin

Junior Member level 2
Joined
Apr 27, 2013
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,436
hello forum. I have one question about serial port.

I am using arduino uno. I want to connect xbee to my arduino and then ı want to connect arduino to the computer. so here is my problem. Can ı connect both computer and xbee simultaneously ? I want to use tx/rx pins for xbee serial communication and ı want to use usb for computer serial communication.
in other words , if ı write serial.write() in the code, this data is send both computer and xbee, or send just computer , or just xbee ?

sorry for my english.
thank you so much.
 

You can use SoftSerial( Virtual serial ) for Xbee and hardSerial for PC.
 
Last edited by a moderator:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…