Applications development

Every XBee solution, even the simplest one, requires some degree of data processing, which means that application development is a key part of any setup. Depending on the architecture you’ve chosen for your XBee system, this intelligence will reside in different parts of the solution.

This chapter provides guidance on the various application development options based on where the intelligence resides within your architecture:

  • MicroPython application development: In a hostless architecture, where the XBee operates as a standalone module, the intelligence is embedded directly into the XBee itself through a MicroPython application. In hybrid architectures, where the XBee handles specific tasks alongside an external microcontroller, you will also need to develop MicroPython code to manage those tasks on the XBee. For example:

    • Weather station: The MicroPython application running on the XBee collects data from sensors (temperature, humidity, wind speed), processes the data, and stores it locally. It then schedules periodic transmission of the data to a remote server or cloud, optimizing network use by batching or sending at specific intervals.

  • Host application development: In hosted and hybrid architectures, much or all of the system’s intelligence resides in an external microcontroller connected to the XBee device. In these scenarios, you will need to develop an application that runs on the microcontroller and interacts with the XBee to manage communication, data processing and other tasks. For example:

    • Smart agriculture: The microcontroller application reads soil moisture and weather data from sensors connected to the XBee or to the microcontroller itself. Then, it processes this information in real-time and sends commands to other XBee devices in the network, like irrigation valves, to efficiently control water usage based on current environmental data.

  • Bluetooth application development: For XBee devices that support Bluetooth, regardless of the architecture you choose, you can develop a mobile application that communicates directly with the XBee via Bluetooth, enabling wireless control and other interactive functionalities. For example:

    • Device provisioning: The mobile app interacts with the XBee over Bluetooth to configure network settings and operational parameters of the connected hardware. It can assign a unique ID, configure its role in the network and update its location data to integrate it seamlessly into a larger system, like a solar farm or smart grid.