艺术
美容与健康
工艺
文化与历史
娱乐
环境
食品与饮料
逆向工程
科学
体育
技术
可穿戴设备
XBee Point-to-Point Wireless Link
Ed

创建者

Ed

14. 八月 2026FI
2
0
0
0
0

XBee Point-to-Point Wireless Link

Two radios that behave like a serial cable with the middle cut out. A pair of Series 1 XBee modules on 802.15.4 pass bytes transparently: whatever enters one module's data-in leaves the other's data-out. Factory-fresh modules already share a network identifier and channel, so a plain link needs no configuration at all. One end sits on an Arduino shield, the other on a USB explorer at a computer. Series 1 does point-to-point directly and does not need the mesh addressing the Series 2 parts use.
初学者
2 hours

说明

1

Solder headers to the XBee shield

Solder the Arduino headers to the shield. The 2 mm XBee sockets are already fitted — only the 0.1 inch Arduino headers need soldering.

此步骤所需材料:

Sparkfun XBee ShieldSparkfun XBee Shield1

所需工具:

Ryobi ONE+ RSI18-0 Cordless Soldering IronRyobi ONE+ RSI18-0 Cordless Soldering Iron
2

Seat the radios — and mind the orientation

One module into the USB explorer, the other into the shield.

  1. The modules are keyed: the pointed end of the outline matches the pointed end of the socket.
  2. Press straight down; the 2 mm pins bend easily.
XBee modules run at 3.3 V. The shield and the explorer both regulate for them — never feed a bare module 5 V, and never wire one straight to an Arduino I/O pin.

此步骤所需材料:

XBee 1mW Trace Antenna - Series 1 (802.15.4)XBee 1mW Trace Antenna - Series 1 (802.15.4)2
SparkFun XBee Explorer USBSparkFun XBee Explorer USB1
3

Confirm both radios share a network and channel

Plug the explorer into the computer and open a terminal at 9600 baud.

  1. Type +++ and wait — do not press Enter. The module replies OK.
  2. ATID shows the network identifier, ATCH the channel.
  3. Repeat for the second module and make the two match. ATWR saves.
Factory-fresh modules already match, so a new pair usually needs none of this. Do it anyway once — knowing how to read the settings is what lets you fix a link later.
4

Power the Arduino end and send bytes

Stack the shield on the Uno. Power over USB-B while testing; a 7–12 V supply on the barrel jack once it runs standalone.

Set the shield's UART switch to DLINE before uploading, then back for the radio to talk. On the SparkFun shield the radio shares the hardware UART with the USB port, so an upload and a live link cannot both use it at once.

xbee_counter.inoarduino
// XBee Point-to-Point Link -- transmitting end
// Sends an incrementing counter once a second over the XBee shield.
// The receiving end is a terminal on the USB explorer at the same baud.
//
// SparkFun XBee Shield UART switch:
//   DLINE = radio on D2/D3 (SoftwareSerial, leaves USB free) <- used here
//   UART  = radio on D0/D1 (hardware serial, blocks uploads)
// DLINE lets the USB serial monitor stay usable while the radio runs.

#include <SoftwareSerial.h>

const int XBEE_RX_PIN = 2;   // Arduino receives  <- XBee DOUT
const int XBEE_TX_PIN = 3;   // Arduino transmits -> XBee DIN
const long XBEE_BAUD  = 9600;   // XBee Series 1 factory default

SoftwareSerial xbee(XBEE_RX_PIN, XBEE_TX_PIN);

unsigned long counter = 0;

void setup() {
  Serial.begin(9600);    // local monitor, over USB
  xbee.begin(XBEE_BAUD); // the radio link
  Serial.println(F("transmitting..."));
}

void loop() {
  xbee.print(F("count="));
  xbee.println(counter);

  Serial.print(F("sent count="));   // so you can see it leave
  Serial.println(counter);

  counter++;
  delay(1000);
}

此步骤所需材料:

Arduino Uno R3 SMDArduino Uno R3 SMD1
USB-B CableUSB-B Cable1
5

Find the range where it actually fails

Walk the Arduino end away from the computer until the counter starts skipping, and write down the distance and what stood between the radios.

The quoted range assumes open air and line of sight. One brick wall or a metal cabinet cuts it sharply. Your measured figure is worth more than the datasheet's, because it is the one your project has to live with.

材料

5

所需工具

1
估计总额
$119.00

CC0 公共领域

此蓝图以 CC0 协议发布。你可以自由复制、修改、分发和使用此作品,无需征得许可。

通过购买蓝图中的产品支持创客,他们将获得 创客佣金 (由供应商设定),或创建此蓝图的新版本并将其作为连接包含在你自己的蓝图中以分享收入。

讨论

(0)

登录 加入讨论

加载评论中...