Learn something new every day More Info... by email
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.
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.