Hello, I have an XBee Series 01 - XB24-AWI-001 and would like to run it in "Transparent Mode" so I can send simple serial commands to my Arduino Uno wirelessly.
Only there is a catch, I need hook the XBee to pins 2 and 13 because I would like to still be able to use the USB interface as a "fail safe" to upload code without having to move a jumper. Another hurdle is that I am using a motorshield with this project and I only have pins 2,13 left to play with.
I do not have the project with me, but will be working with it today after work. I believe that the following would be similar to the code I would need to perform the communication between my XBee USB dongle and my project:
#include <SoftwareSerial.h>
SoftwareSerial mySerial = SoftwareSerial(2, 13);
Has anybody tried something similar?
Thoughts?
Thank you,
Ec7
--EDIT-- (More Info)
The current code for the USB interface is:
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
}
void loop() {
// read the IO:
if (Serial.available() > 0) {
int inByte = Serial.read();
I am also guessing I would leave this in here to keep the USB enabled, but where to add the above code to read Pins 2,13? Right after it?
This is the XBee Adapter I am using:
Thanks =)