background image

each other. Then we'll move on to the 

remote control Arduino

 sketch.

Required Materials

To follow along with this tutorial, you will need the following materials. You may not need everything
though depending on what you have. Add it to your cart, read through the guide, and adjust the cart
as necessary.

1x 

XBee Shield

 -- The star of this tutorial.

You'll also need 

headers

 to install into your shield. We recommen

stackable headers

.

1x Arduino

 -- The XBee Shield should work with any Arduino-compatible board -

Uno

,

RedBoard

, 

Mega

, you name it.

2x XBees

 -- XBees exist in a variety of 

series

frequencies

, and 

ranges

. If you're just getting

started with XBee, we highly recommend going with 

Series 1

 models -- either with a 

trace

antenna

wire antenna

 or 

u.fl connector

.

For more help picking an XBee, check out our 

XBee Buying Guide

.

Heads up!

 While this tutorial was written for XBee Series 1, you can still follow along using

XBee Series 3 modules. Just make sure to configure it with the 802.15.4 (Series 1) firmware.
For more information, check out the 

Exploring XBees and XCTU

 tutorial.

1x Explorer

 -- The Explorer board allows you to connect an XBee to your computer. You can

use either the 

Explorer USB

, 

Explorer USB Dongle

, or 

Explorer Serial

.

Depending on which explorer you have, you may also need a matchin

mini-B USB

 or

serial cables

.

At least one 

computer with 

X-CTU

 installed.

The latest version of X-CTU is available for both Mac and Windows!

Tools

You will need a soldering iron, solder, and 

general soldering accessories

.

Solder Lead Free - 100-gram Spool

TOL-09325
$8.95
7

Favorited Favorite 

33

Page 5 of 24

Содержание Shield

Страница 1: ...municate in transparency mode However this can apply to the XBee Series 3 module as long as you configure the firmware to the legacy 802 15 4 protocol For more information check out the Exploring XBee...

Страница 2: ...SparkFun XBee Shield WRL 12847 16 95 26 Favorited Favorite 25 Wish List Page 2 of 24...

Страница 3: ...SparkFun XBee 3 Wireless Kit KIT 15936 78 95 2 Favorited Favorite 13 Wish List Page 3 of 24...

Страница 4: ...h we explain in a separate tutorial Covered In This Tutorial The goal of this tutorial is to set up wireless XBee communication between a computer and an Arduino XBee Shield combo Then using a termina...

Страница 5: ...her with atrace antenna wire antenna or u fl connector For more help picking an XBee check out ourXBee Buying Guide Heads up While this tutorial was written for XBee Series 1 you can still follow alon...

Страница 6: ...lain how to configure XBee networks and addresses In addition to that tutorial we also recommend checking these guides out Serial Communication Serial communication is critical to controlling and mana...

Страница 7: ...s What they are and how to assemble them Favorited Favorite 5 Hardware Overview Here s a quick overview of the most components of the XBee Shield Below we ll go more in depth on the most important com...

Страница 8: ...to any device attached to the Arduino s hardware UART So to avoid any problems that might arise from connecting the XBee to the Arduino s hardware UART we usually take advantage of the Software Serial...

Страница 9: ...xplaining the operation of each LED LED Label LED Color XBee Pin Connection Default Operation Notes PWR Red 3 3V Indicates power is present DIO5 Green Associate DIO5 Associated indicator blinks when t...

Страница 10: ...re is some white silkscreen on the Shield PCB to help orient your XBee as you re plugging it in Make sure to match up the XBee s two diagonal edges with the two diagonal lines on the PCB With everythi...

Страница 11: ...is example assumes you haveXCTU installed and two compatibly configured XBees one connected to your computer via a USB Explorer or Dongle or Serial Explorer and another plugged into the Shield Arduino...

Страница 12: ...reSerial XBee 2 3 RX TX For Atmega2560 ATmega32U4 etc XBee s DOUT TX is connected to pin 10 Arduino s Software RX XBee s DIN RX is connected to pin 11 Arduino s Software TX SoftwareSerial XBee 10 11 R...

Страница 13: ...ge for the Software Serial library Arduino Software Serial Library Pin Definitions To use re define the software serial pins on an Arduino Mega 2560 or Arduino Leonardo you would just need to comment...

Страница 14: ...cate with the XBee because the Arduino is rebooting Hardware Serial Passthrough This example is for those trying to use the hardware UART on an ATmega32U4 based Arduino Copy and upload the sketch belo...

Страница 15: ...ad XBee UART1 pins 0 and 1 if Serial1 available XBee UART1 pins 0 and 1 If data comes in from XBee send it out to serial monitor Serial write Serial1 read Serial port Note If you are using an Arduino...

Страница 16: ...xploring XBee tutorial Example Remote Control Arduino Setting up a chat system is fun but where XBees and the XBee Shield really shine is in passing data to and from an Arduino so you can remotely con...

Страница 17: ...fics IDE Arduino 1 0 5 Hardware Platform SparkFun RedBoard XBee Shield XBee Series 1 1mW w whip antenna XBee USB Explorer connected to computer with another XBee Series 1 1mW connected to that This co...

Страница 18: ...le XBee available 2 Wait for pin and value to become available char pin XBee read char hl ASCIItoHL XBee read Print a message to let the control know of our intentions XBee print Setting pin XBee prin...

Страница 19: ...enter Then send a digital pin to be read The Arduino will print the digital reading of the pin to XBee void readDPin while XBee available 1 Wait for pin to be available char pin XBee read Read in the...

Страница 20: ...prints that print a usage menu over to the other XBee void printMenu Everything is F d which stores the strings in flash That ll free up SRAM for more importanat stuff XBee println XBee println F Ardu...

Страница 21: ...he Arduino sketch first starts up it will print a helpful usage menu After that s printed follow the directions to send commands to your Arduino To control pins 10 11 12 and 13 send the hexadecimal eq...

Страница 22: ...ing to a single computer The power of XBees comes from their simplicity they make your projects wireless by simply serial printing Resources and Going Further That should be enough to get you started...

Страница 23: ...p further by controlling it with an XBee Simon Splosion Wireless This is a tutorial demonstrating one of many techniques to hack the Simon Says We will highlight the technique to take your Simon Says...

Страница 24: ...Page 24 of 24...

Отзывы: