MicroPython — Pythonic Edge Computing

As an example, let’s look at Amazon Web Services (AWS) IoT platform, which provides a Software Development Kit (SDK) for Python.

It can be installed on an MCU using upip, which we discussed earlier.

Connecting to AWS IoT using MicroPython is effortless and, what’s more, large portions of the code can be platform-agnostic, which means that logic for data processing can be easily exported to or from other applications written in Python.

To create a system that is capable of performing Edge computing, one needs MCUs that provide substantial computing power (for a microcontroller) and have some networking capabilities.

The most popular MCUs out there at the moment are ESP8266 and ESP32.

These are probably the most popular MCUs used in the IoT.

Both of them are equipped with a WiFi module and have quite a powerful microprocessor.

They are also really cheap.

Given their popularity, it should come as no surprise that MicroPython was ported to support these devices.

AlternativesThere aren’t many alternatives to MicroPython, and there seems to be only one that doesn’t directly descend from it.

For the latter, there are two that are worth discussing as viable alternatives.

CircuitPython is a fork of MicroPython, designed to be used with Adafruit hardware.

Its main purpose is to teach programming with microcontrollers.

There are minor differences between it and MicroPython, but the code is largely the same.

Pycom is an IoT platform which provides clients with hardware, software and networking solutions.

The firmware for its MCUs is open source and based on MicroPython.

Pycom has nicely reimplemented AWS IoT Python SDK, which makes it easily installable on ESP32 microcontrollers running MicroPython.

The only alternative for MicroPython out there with its own codebase is Zerynth.

This started off as Viper and it is a hybrid of Python and C language.

It is typed and tries to combine the easy of Python development with the control of C.

Zerynth is also an IoT platform and provides integration with many Cloud IoT services.

Some of Zerynth’s language structure is available to use inside MicroPython to optimise code performance.

SummaryIoT systems and applications are appearing increasingly in the world around us.

They are responsible for managing fleets of devices in a multitude of environments.

The trend is proving stable and it’s widely accepted that the IoT is conquering the world.

Up until now, to become a part of this phenomena, one had to learn languages like C or C++.

MicroPython allows every Python developer to try his/her programming skills in a microcontroller world.

There is, for sure, an enormous amount of platform-specific knowledge that that has to be assimilated in order to design and program complicated hardware applications, but the first and hardest step can be done seamlessly with MicroPython.

Business PerspectiveIf you want to make the most of the IoT, edge computing can deliver fast and powerful results, all while saving money.

However, while Cloud and Serverless technology can help, to fully achieve this, you need to optimise the microcontrollers (MCUs) underneath these devices.

Utilising more modern coding solutions, such as Python, can help update your MCUs and provide a solution that’s more accessible.

Originally published at https://www.



.. More details

Leave a Reply