Closed GoogleCodeExporter closed 9 years ago
I have been playing with the later development release of this library and have
gotten it to compile with SoftwareSerial by making a few modifications. Other
mods are required by the use of the latest (1.0) release of Arduino.cc
a. Change references to WProgram.h to Arduino.h
b. Change serial library to SoftwareSerial (throughout code), and changed the
include to have relative path:
#include "..\SoftwareSerial\SoftwareSerial.h"
c. In the following code:
void XBee::print(uint8_t val) {
if (_useNss) {
_nssSerial->print(val, BYTE);
} else {
_serial->print(val, BYTE);
}
}
Change BYTE to HEX
d. Added #include <SoftwareSerial.h> to the sketch itself.
I have not yet tested the code, but intend to do so shortly.
Original comment by Cayenne...@gmail.com
on 16 Dec 2011 at 5:16
Okay, test revealed that changing Byte to HEX is bad. Maybe just a simple
Serial.print command. This works in the non-NSS version as follows:
void XBee::sendByte(uint8_t b, bool escape) {
if (escape && (b == START_BYTE || b == ESCAPE || b == XON || b == XOFF)) {
// std::cout << "escaping byte [" << toHexString(b) << "] " << std::endl;
Serial.write(ESCAPE);
Serial.write(b ^ 0x20);
} else {
Serial.write(b);
}
}
Original comment by Cayenne...@gmail.com
on 17 Dec 2011 at 3:23
[deleted comment]
Any news about this feature?
I am still looking for this problem solution.
Original comment by Nardello...@gmail.com
on 14 Feb 2012 at 10:53
Andrew has uploaded a new experimental version, using a patch I wrote to enable
using SoftwareSerial.
It needs beta testing. Please, if you're interested in SoftwareSerial support,
give it a try and report your results?
Original comment by paul.sto...@gmail.com
on 16 Oct 2012 at 8:34
This was resolved with Paul's contribution back in 0.4 beta. I'm just getting
around to updating issue statues
Original comment by andrew.rapp@gmail.com
on 2 Feb 2014 at 6:41
Original issue reported on code.google.com by
robfal...@gmail.com
on 22 Nov 2011 at 7:51