Digi XBee Cellular Supports MicroPython Programmability
Introduction to MicroPython
MicroPython is an open-source programming language based on Python 3, and has been optimized to fit on small devices with limited hardware resources, such as micro-controllers. It includes an interactive REPL (or read-evaluate-print-loop), which allows programmers to connect to an embedded board and execute code without the need for compiling or uploading, ideal for quick experimentation of code blocks and prototyping. It also includes extensive built-in software libraries, making simple programming tasks like network socket connections or I/O pin management quick and easy.
MicroPython on Digi XBee Cellular
Digi XBee Cellular now has MicroPython! With 32 KB of RAM and 32 KB of Flash available in this MicroPython ‘sandbox’, OEMs now have the power and flexibility to develop and integrate their own unique features. In some simple sensing/actuating use-cases, it can eliminate the need for an external micro-controller, saving PCB space and simplifying the hardware design. MicroPython is great for reading and/or controlling XBee I/O lines (13 Digital I/Os, 4 Analog 10-bit inputs). It could also be used to reduce cellular data consumption by adding local intelligence that dictates what data should and should not be sent over the air, leading to lower monthly data rate cost.
MicroPython Terminal in XCTU
Included in the latest XCTU release (v6.3.8) is a new MicroPython terminal, a tool that allows the user to interact with MicroPython on the Digi XBee Cellular modem. Through the serial interface in the terminal, users can interact with the REPL to test, load, and run MicroPython code. Of course, those users that prefer to use their own terminal program like Tera Term or Putty can continue to do so. But with the new terminal included in XCTU, users have the convenient option to discover, configure AND program their Digi XBee Cellular modem through this single interface.
Simple MicroPython Example for XBee Cellular:
Where can I learn more about MicroPython?
Check out the following resources to learn more about MicroPython and how to use it with the Digi XBee Cellular:
- Get Started with MicroPython (Section in User Guide 90001525)
- Digi MicroPython Programming Guide (90002219)
- MicroPython homepage (micropython.org)
- MicroPython Github (https://github.com/micropython)