Category: 

What Are the Best Tips for XBee® Programming?

Article Details
  • Written By: Alex Newth
  • Edited By: Angela B.
  • Last Modified Date: 17 September 2014
  • Copyright Protected:
    2003-2014
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The fewest car accident fatalities occur on Tuesdays.  more...

October 23 ,  1983 :  Suicide bombers killed nearly 300 US and French military troops in Beirut.  more...

XBee® programming is used to make microcontrollers and similar units, and following some useful tips can make it easier to wield this programming language. Using commands sent via the American Standard Code for Information Interchange (ASCII) is usually better, because this limits programming mistakes. When setting up XBee® programming, one can change the frequency ID, and this should be utilized. Programmers are able to change how long it takes to send packets, and this number should be adjusted based on how much information the microcontroller is sending. If a module is made with a sleep mode function, users also should ensure to make a wakeup function.

When someone is using XBee® programming, there are two ways to form coding and commands: binary and ASCII. Binary is sometimes easier and unavoidable, but users should use ASCII when possible. If commands are sent over binary, the numbers may correlate to ASCII characters, which can cause users to accidentally input commands they do not want to use.

Ad

A digital channel must be used to send information from a controller to a device made with XBee® programming. XBee® normally is set with a default channel number and, while this setting does not need to be changed, there can be unpredictable problems if the device is used around other XBee® devices. If every device is using the same default channel, then one controller will cause all the other devices to correspond to the one controller’s commands. For this reason, changing the default ID with the ATID command is usually a good idea.

Packets of information are commonly sent between the XBee® controller and device, and there is a way to optimize the sending of packets. With the ATRO command in XBee® programming, users are able to adjust how long it takes for packets to be sent. Setting this at a slower speed normally is better for larger packets, because this allows the controller and device to take more time assembling the information. Faster speeds normally are better for small packets, because it should not take long for small packets to be assembled.

If a module is made with XBee® programming, then it is common for users to add a sleep command, which keeps the module from taking up power when the module is not used. At the same time, many users forget to make a wakeup command, which is a vital step. Without a wakeup function, the device may have to be reset to turn the module back on.

Ad

More from Wisegeek

You might also Like

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email