សិល្បៈ
សម្រស់ និង សុខុមាលភាព
សិប្បកម្ម
វប្បធម៌ និង ប្រវត្តិសាស្ត្រ
ការកម្សាន្ត
បរិស្ថាន
ម្ហូប និង ភេសជ្ជៈ
វិស្វកម្មបញ្ច្រាស
វិទ្យាសាស្ត្រ
កីឡា
បច្ចេកវិទ្យា
ប្រដាប់ដែលស្លៀក
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.

Materials for this step:

Sparkfun XBee ShieldSparkfun XBee Shield1 ដុំ

Tools needed:

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.

Materials for this step:

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);
}

Materials for this step:

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
Estimated Total
$119.00

CC0 សាធារណៈ

ប្លង់នេះត្រូវបានចេញផ្សាយក្រោម CC0។ អ្នកមានសិទ្ធិចម្លង កែប្រែ ចែកចាយ និងប្រើប្រាស់ដោយមិនចាំបាច់សុំអនុញ្ញាត។

គាំទ្រអ្នកបង្កើតដោយទិញផលិតផលតាមរយៈប្លង់របស់ពួកគេ ដែលពួកគេទទួលបាន កម្រៃជើងសារអ្នកបង្កើត កំណត់ដោយអ្នកលក់ ឬបង្កើតកំណែថ្មីនៃប្លង់នេះ ហើយបញ្ចូលជាការតភ្ជាប់ក្នុងប្លង់របស់អ្នកដើម្បីចែករំលែកចំណូល។

ការពិភាក្សា

(0)

ចូល ដើម្បីចូលរួមពិភាក្សា

កំពុងផ្ទុកមតិ...