Search Symmetry

Close
  1. Home
  2. Symmetry Blog
  3. From Digi: "Hands-on MicroPython Examples for Edge Computing: Part 2"

From Digi: "Hands-on MicroPython Examples for Edge Computing: Part 2"

Symmetry Electronics Team in Blogs on December 16, 2018

About Symmetry Electronics Team

Established in 1998, Symmetry Electronics is a focused global distributor of wireless connectivity solutions, sensors, and audio-video technologies. Offering comprehensive design support and available-to-ship inventory, Symmetry is committed to helping engineers accelerate time to market, reduce costs, and offer modern solutions for their IoT designs. Acquired by the Berkshire Hathaway company TTI, Inc. in 2017, Symmetry Electronics is headquartered in Los Angeles with international offices in Mexico, Canada, and China.

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:

  1. Getting Started: Demonstrates how to set up the hardware and software you’ll need.
  2. Hello World Example: Teaches how to upload code to Digi XBee3.
  3. 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:


TMP36, Digi XBee3 Cellular, XBIB connected to MicroPython Terminal in XCTU

Source: https://www.digi.com/blog/hands-on-micropython-programming-examples-for-edge-computing-part-2/ 

 

Looking to integrate Digi products with your design? Our Applications Engineers offer free design and technical help for your latest designs. Contact us today!

Share

Symmetry Electronics Team in Blogs on December 16, 2018

About Symmetry Electronics Team

Established in 1998, Symmetry Electronics is a focused global distributor of wireless connectivity solutions, sensors, and audio-video technologies. Offering comprehensive design support and available-to-ship inventory, Symmetry is committed to helping engineers accelerate time to market, reduce costs, and offer modern solutions for their IoT designs. Acquired by the Berkshire Hathaway company TTI, Inc. in 2017, Symmetry Electronics is headquartered in Los Angeles with international offices in Mexico, Canada, and China.

Why partner with Symmetry Electronics? Symmetry's technical staff is specially trained by our suppliers to provide a comprehensive level of technical support. Our in-house Applications Engineers provide free design services to help customers early in the design cycle, providing solutions to save them time, money and frustration. Contact Symmetry for more information.

Subscribe

Stay up to date with industry and supplier news!