3) Skonfiguruj radio
If you’re not familiar with configuring radios using AT commands, review the steps in the Podstawowe XBee 802.15.4 Pogawędzić tutorial, which walks you through configuring CoolTerm to program the radios.
- Insert the XBee into the Explorer USB and connect it to your computer.
- Launch CoolTerm and connect to the XBee.
- Here are the commands we’re going to use to configure the radio:
| Function | Command | Parameter |
|---|---|---|
| Reset | ATRE | N/A (resets the radio to its factory settings) |
| PAN ID | ATID | 3001 (any address from 0 to FFFE will do) |
| MY Address | ATMY | 2 |
| PWM Pin 0 Configuration | ATP0 | 2 (PWM output) |
| I/O Input Address | ATIA | 1 (address of the transmitting radio) |
| Write to memory | ATWR | N/A (save the settings to flash memory) |
- Here’s what your terminal session might look like. The user input is in bold:
+++ OK ATRE OK ATID 3001 OK ATMY 2 OK ATP0 2 OK ATIA 1 OK ATID 3001 ATMY 2 ATP0 2 ATIA 1 ATWR OK
Zauważyć: Remember to issue the ATWR command when you’re done so that the settings are saved in the radio’s flash memory. If you don’t issue this command, the radio will revert to its old settings when it loses power.


