ElieNamias / xbee-arduino

Automatically exported from code.google.com/p/xbee-arduino
GNU General Public License v3.0
0 stars 0 forks source link

use of serial before library #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. using Serial.begin(9600) and afterwards stoping it with Serial.end(9600)
2. then starting xbee with xbee.begin(9600);

What is the expected output? What do you see instead?
I would expect to be able to communicate to xbee but i realized after the use 
of Serial, the rest of the code doesn't work.

What version of the product are you using? On what operating system?
Arduino-xbee 0.2.1
Windows xp

Please provide any additional information below.
Fixing this would be useful in order to be able to reset and set the xbee in 
AP2, and once in API mode 2 communicate with it using the library.
All from the same arduino program.

Original issue reported on code.google.com by Dbs...@gmail.com on 25 Aug 2010 at 4:46

GoogleCodeExporter commented 9 years ago
Duplicated your problem I believe. Solution:
Don't close the Serial port, or reopen it after the xbee.begin(9600).

ex
Serial.begin(9600);
/*your configuration code*/
//Serial.end(9600) <- don't do this
xbee.begin(9600);

Don't think this is a bug

Original comment by theh...@gmail.com on 18 Feb 2011 at 3:05

GoogleCodeExporter commented 9 years ago

Original comment by andrew.rapp@gmail.com on 3 Apr 2011 at 2:51