From Digi: "Hands-on MicroPython Examples for Edge Computing: Part 2"
In our first post in the MicroPython programming for the edge series, we talked about how to collect sensor readings and make sense of them using the Digi XBee3 Cellular LTE-M Kit, as well as Digi’s free configuration software, XCTU, and some simple MicroPython code. Welcome to Part 2 of this series.
The edge intelligence provided in Digi’s XBee3 line of embedded RF modules makes sending data to the cloud a snap. For our second project in this hands-on series, we show how to upload temperature readings measured from a Digi XBee3 Cellular LTE-M module to “data streams” on Digi Remote Manager (DRM). Developers can use this data and device management platform for free. The Digi XBee3 Cellular line supports open communications standards, so it can also share data with Amazon’s IoT Platform, Microsoft Azure, Adafruit.io, Google Cloud IoT, ThingSpeak, IBM Watson and many others. Look for hands-on tutorials or several of those in future projects. Readers of our first project will recall that MicroPython is an open-source programming language based on Python 3, modified to fit on small devices and optimized for microcontrollers. By using MicroPython you can rapidly create connections to cloud services right from the edges of your network.
Send Data to Digi Remote Manager
Many IoT systems feed data to online cloud platforms on the Internet. They typically sample some value locally, like temperature, then send the readings to any one of a dizzying number of online application for logging, processing and data visualization. In this project, we will take some temperature measurements using a simple sensor, then send them to Digi Remote Manager® as a “data stream” that can be visualized in different ways, accessed via an open API or stored for later use.
We begin with the exact same hardware setup used in the “Sense, Transform and Send a Value” project, including the TMP36 temperature sensor.
Set up the Hardware
If you missed our first post, please visit Hands-on MicroPython Programming Examples for Edge Computing: Part 1 and work through the following items to prepare for this second project:
- Getting Started: Demonstrates how to set up the hardware and software you’ll need.
- Hello World Example: Teaches how to upload code to Digi XBee3.
- Sense, Transform and Send a Value: Shows how to take a temperature reading and send it as a text message.
Once you have set up the Digi XBee3 hardware, hooked up the TMP36 temperature sensor, connected it to the configuration software, and opened the MicroPython terminal in XCTU, you are ready to begin. Your setup should look similar to this one: