Every XBee solution requires some degree of data processing. Depending on the architecture of your system, this intelligence can reside in different parts of the solution.
This chapter guides you through the main application development options depending on where your logic runs:
-
Develop for the XBee: In a hostless architecture, where the XBee operates as a standalone module, you can use MicroPython to embed logic into the XBee for local sensing, control, or scheduled communication tasks. This is also useful in hybrid architectures, where the XBee handles specific tasks alongside an external microcontroller.
The XBee collects data from sensors (temperature, humidity, wind speed) and stores it locally. Then, it schedules periodic transmission to a remote server or cloud, optimizing network use by batching the stored data.
-
Develop for external microcontrollers: In hosted and hybrid architectures, most of the system’s intelligence resides in an external microcontroller connected to the XBee device. In these scenarios, the microcontroller must run an application to interact with the XBee to manage communication, data processing and other tasks.
The microcontroller reads soil moisture and weather data from sensors connected to the XBee or to itself. Then, it processes the information, and sends commands to other XBee devices in the network (such as irrigation valves) to efficiently control water usage based on environmental conditions.
-
Develop Bluetooth applications: For XBee devices that support Bluetooth®, regardless of the chosen architecture, you can develop a mobile application that communicates directly with the XBee via Bluetooth®, enabling wireless control and other interactive functionalities.
A mobile app can simplify individual interaction with the deployed XBee devices over Bluetooth® by allowing to configure network settings and operational parameters on site. It can assign a unique ID, set the role in the network, and update the location data of each device to integrate it seamlessly into larger systems such as solar farms or smart grids.