NGHỆ THUẬT
LÀM ĐẸP VÀ SỨC KHỎE
THỦ CÔNG
VĂN HÓA VÀ LỊCH SỬ
GIẢI TRÍ
MÔI TRƯỜNG
THỰC PHẨM VÀ ĐỒ UỐNG
KỸ THUẬT NGƯỢC
KHOA HỌC
THỂ THAO
CÔNG NGHỆ
THIẾT BỊ ĐEO
XBee Point-to-Point Wireless Link
Ed

Tạo bởi

Ed

14. tháng Tám 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.
Cơ bản
2 hours

Hướng dẫn

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.

Vật liệu cho bước này:

Sparkfun XBee ShieldSparkfun XBee Shield1 cái

Công cụ cần thiết:

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.

Vật liệu cho bước này:

XBee 1mW Trace Antenna - Series 1 (802.15.4)XBee 1mW Trace Antenna - Series 1 (802.15.4)2 cái
SparkFun XBee Explorer USBSparkFun XBee Explorer USB1 cái
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);
}

Vật liệu cho bước này:

Arduino Uno R3 SMDArduino Uno R3 SMD1 cái
USB-B CableUSB-B Cable1 cái
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.

Vật liệu

5

Công cụ yêu cầu

1
Tổng ước tính
$119.00

CC0 Phạm vi công cộng

Bản thiết kế này được phát hành theo CC0. Bạn tự do sao chép, sửa đổi, phân phối và sử dụng cho bất kỳ mục đích nào mà không cần xin phép.

Hỗ trợ nhà sáng tạo bằng cách mua sản phẩm qua bản thiết kế, nơi họ nhận Hoa hồng nhà sáng tạo do nhà bán hàng đặt, hoặc tạo phiên bản mới và kết nối trong bản thiết kế riêng để chia sẻ doanh thu.

Thảo luận

(0)

Đăng nhập để tham gia thảo luận

Đang tải bình luận...