Hello,
I ve bought a new Arduino board "Arduino Leonardo" : http://arduino.cc/en/Main/arduinoBoardLeonardo
This card is the same as Arduino UNO with a Real USB stack (I think it will become popular in a near future). Due to its USB support the serial has been change (default serial is USB) and to be able to use it with the Xbee library I had to change some things in the Xbee library.
Here is the patch :
Index: XBee.cpp
===================================================================
--- XBee.cpp (revision 42)
+++ XBee.cpp (working copy)
@@ -766,7 +766,12 @@
_response.init();
_response.setFrameData(_responseFrameData);
// default
- _serial = &Serial;
+#if defined(USBCON)
+ _serial = &Serial1;
+#else
+ _serial = &Serial;
+#endif
+
}
uint8_t XBee::getNextFrameId() {
It is still compatbile with Arduino Uno. It break nothing...only add the support of Arduino Leonardo. This patch was originaly propose on Arduino support forum here :
http://arduino.cc/forum/index.php/topic,111354.0.html
Can you please integrate it on the repository ?
Thx