The Xbee is often used for controlling droids or exchange informations between arduinos.
There are 2 ways two program the XBEE.
The first needs the official XBEE Dongle from Sparkfun (WRL-11697) that costs ~25USD.
The second one only needs an Arduino (Uno) and 4 Jumper Wires.
This programing scenario is for setting up the XBEE for the Marcduino system.
Be aware that you might need other settings if you’re setting it up for another environment.
The Xbee is replaceable with an ESP32/8266: ESP as XBEE replacement
Programming with XBEE Dongle
Needed components:
XBEE (in this case the 6SB XB2B-WFST-001)
XBEE Dongle from Sparkfun (WRL-11697)
XCTU Software:
https://www.digi.com/products/embedded-systems/digi-xbee/digi-xbee-tools/xctu
Connection
Just plug the XBEE on the Dongle and connect it to an USB Port
Programming with Arduino (Uno)
Needed components:
XBEE (in this case the 6SB XB2B-WFST-001)
Arduino (Uno)
XCTU Software:
https://www.digi.com/products/embedded-systems/digi-xbee/digi-xbee-tools/xctu
Connection
Connections:
- Tx (pin2)of XBee -> Tx of Arduino board
- Rx(pin3) of Xbee -> Rx of Arduino board
- Gnd(pin10) of Xbee -> GND of Arduino board
- Vcc (Pin1) of Xbee -> 3.3v of Arduino board
Programming with XCTU
Download the XCTU software and install it. After downloading and installing the XCTU software, open it and make sure your XBee module is properly connected.
Start the XCTU Software
When the XBEE is connected click on the Xbee with + Symbol in the upper left corner and the XBEE should show up. If not klick the icon (Xbee with magnifying lens) next to it to search for comports, select then the right comport and go on and add the XBEE.
After the software found your XBEE simply klick it in the left list and it’s settings should open in the right column.
For the Marcduinosetup you need to make 5 settings:
Make this five modifications:
- Change Infrastructure Mode to SoftAP (default is STA)
- Change SSID (Networkname) to whatever you want
- Change IP Protocol to TCP (default is UDP)
- Setup WPA2 password encryption.
- Enter the Password you want for the XBEE WiFi (8-64 characters with WPA2)
When you’re done click on the Write Icon (the one with a pen) at the top and you’re done.
Additional Info:
In the R2 Touch app you need to make two changes in the settings:
Change the Receiver IP to 192.168.1.10
Change the Receiver Port to 9750