MicroPython Powered Up For IoT
Wednesday, 23 April 2025

The latest version of MicroPython has some significant improvements which make it even better as the first choice for a platform-independent language for IoT and embedded computing.

MicroPython has become the number one way to program microcontrollers like the Pico or the ESP32 if you can't justify or don't need to work in C. It is amazing that we can get so much of Python 3 into such small devices and still have room to add IoT features.

The main addition to version 1.25.0 is ROMFS, a file system that only the IoT could love. It provides a file system that lives on a read-only memory which at first thought seems like something you wouldn't want. However, ROMFS allows you to execute code directly from ROM and you can use it to store resouces as if they were standard files. This is particularly useful for devices that are short of RAM or Flash. The only downside is that it is only enabled on selected boards - Arduino stm32 and ESP266. On others it can be enabled manually. At the moment the documentation is also lagging well behind. To make use of the feature the mpremote utility has been extended to allow the construction of ROMFS partitions.

Also new is support for 32-bit RISC V devices in the inline assembler. Of course, this is particulaly of interest to any Pico 2 users who want to experiment with the alternative RISC cores. Support for the Pico 2 in general has been introduced.

The main language components have also had some work.

"Improvements to the core interpreter include: full support for tuples and start/end arguments in  the str.startswith() and str.endswith() methods; enabling of the two-argument version of the built-in next() function on most of the ports; a new sys.implementation._build entry which holds the build name of the target; and vfs.mount() with no arguments now returns a list of mounted filesystems."

One particularly important addition is Datagram TLS, i.e. encrypted datagrams. Datagrams are often a good choice for IoT devices that need to send bursts of data, but until now encryption hasn't been an option. Now you can associate an SSLContext to be used with the datagram option. This is available on a subset of devices including the Pico 2.

MicroPython keeps getting better, but it could do with more general implementation of new features across devices that can support them.

micropythonlogo

Find out the fine detail by reading the announcement.

More Information

https://github.com/micropython/micropython/releases/tag/v1.25.0

Related Articles

MicroPython Demoed Running Bare Metal In Browser

Micro Python - The Latest Python

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


Time To Change The Clocks
30/03/2025

This is the time of year when the clocks change to provide us with daylight saving and a significant trauma. The time is ripe to think of innovative clocks and one thing about clocks is that they suit [ ... ]



Linux Foundation Mentorship Program
15/04/2025

Applications are now open for Summer 2025 participation in the Linux Foundation Mentorship Program, a program that provides structured guidance and opportunities for newcomers to contribute to th [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Wednesday, 23 April 2025 )