Has anyone tested the Due with a xbee module (Series 1 or 2) for a connection to another arduino?
Till now, I found just one shield thats described as running with the due:
And the question is, if i need a shield for the xbee module running on the due. Or are they just for levelshifting because the xbee module is running at 3,3V and the other arduinos except the due are running with 5V? Hence the due is running with 3,3V like the xbees, maybe i just have to connect them to each other? And if, how should they be connected?
Me too, i'm having problems with xbee and arduino due.
The example from the library works on all other boards (UNO, Mega... ) but not on arduino due.
I have this error when i do the compilation : "/arduino-1.5.2/libraries/SoftwareSerial/SoftwareSerial.cpp:41: fatal error: avr/interrupt.h: No such file or directory
apparently there is still no software serial library for the due but i don't know what to do to make my xbee work with arduino due.
I am waiting for your reply !!!
please help !
Best regards !!
I recently made an adaptation of the SoftwareSerial library for Teensy 3.0. It does not actually implement software-based serial, but if you give it the pins for real hardware serial, it allows you to use libraries and sketches that depend on SoftwareSerial. All you have to do is edit the pin numbers in the SoftwareSerial instance to match the pins for a real serial port.
Here's the code:
Well, that's all you have to do for Teensy 3.0. This can be adapted pretty easily to Due. You'll have to change the #if defined(__MK20DX128__) to __SAM3X8E__, and in the constructor you'll have to edit the pin numbers to the pins Due uses for those ports. But those simple edits should make it work.
There are a good number of libraries and sketches with hard-coded dependency on SoftwareSerial, so this code should help Due users.... so I'm sharing it with you. Christian, if you're reading this, feel free to include it in 1.5.3 if you like.
Yes, I got DUE to talk both ways w/ my old ATmega328p using series 1 radios and this library. No special changes needed. I don't use softserial, i connect using the hard serial lines.
I connected xbee pin 1 (i think), to 3.3V, pin 10, to gnd, pin 2 to rx, pin 3 to tx... The pin numbers may be wrong, but from the top left that's what they were. Dout I know goes to RX and Din goes to TX to get two way comms. No logic converters needed for DUE like w/ my arduino 5v stuff.
Yes some "xbee shields" assume a 5 volt Arduino but probably only to lower the voltage to the 'Bee to 3.3 volts. Digi Xbee radios are powered by 3.3 volts but have 5 volt tolerant data pins so most shields probably do not level shift those.
Some other radios that use the "bee pinout" are 3.3 volt only, like the Sparkfun Wifi module so one has to be careful there.
With the Due, one should look to use the hardware serial lines as there are several to choose from.