Ceci est une ancienne révision du document !
Greetings again fellow Sentient Lifeforms. Things here at landing pad 2997 on Terra have been so busy, I feel like a “long tailed cat in a room full of rocking chairs”. Since we last were together, we had some very severe storms move through one night, and it was so bad, large hail broke two windows, the strong winds blew down two sections of the fence here at the house, and the roof has to be replaced. The storm dumped over 4 inches of rain and the hailstones were between 3 to 4 inches, in 45 minutes. But life moves on as does the world of Micocontrollers. MicroPython turned 10 years old on May 3rd. On June 2, 2024, Micropython version 1.23 was released. Each time there is an official release of a software package, especially Micropython, Python and so on, it’s a big deal and this release is no different. According to the Micropython website, https://github.com/micropython/micropython/releases/tag/v1.23.0, the biggest changes are “Dynamic USB devices, revamped webassembly port, openamp, tls, vfs modules”. What does all that mean? Well, I’m going to try to tell you about some of it, and we’ll explore some of them in depth in future articles.
First, let’s look at the Dynamic USB device support. According to rumors, only the SAMD and RP2020 (RPi Pico/Pico-W type devices) have this support at the moment. What can you do with this addition? Supposedly you can build multiple send/receive serial streams using PIO, talk easily to MIDI devices and HID (Human Interface Devices) like keyboards, mice, game controllers and more. That in itself is exciting, but as I showed above, there is more. Another big addition is around the openamp support, which is an inter-core communication system that allows MicroPython to run on one core, and other systems on the other core(s) at the same time. Supposedly there is a WebAssembly port in the interpreter, letting you run MicroPython in your browser? We’ll try to look at this also in the future. As to the vfs and tls support, “vfs (virtual filesystem) related functions and classes, such as mount, umount, and VfsFat. These were originally in the os module, but having them there is not compatible with CPython, so they have been moved to their own dedicated module. They still exist in the os module for now, but will eventually be removed from there, so it's recommended to start using the vfs module from now on. Similarly, the new tls module is an evolution of the ssl module, whereby all the existing functionality in ssl has been moved to the tls module. This is done because MicroPython's SSL interface is becoming increasingly different to CPython's, and moving this SSL/TLS functionality to a new tls module gives it room to grow and obtain new features that are useful for embedded applications. And compatibility with normal Python is still retained via a pure Python implementation of the ssl module. One new feature in the new tls module is the ability to register a certificate verification callback.”
As to support for the esp32 Microcontrollers, “The esp32 port has seen some important bug fixes in the BLE component, to deinitialise without crashing, and increase the BLE task stack size. This port also uses the new I2S IDF driver, and supports IDF 5.0.5 and 5.2. There is support to enter the bootloader via machine.bootloader(), and a new esp32.mcu_temperature(), for ESP32-C3/S2/S3 devices.” The list of things that have changed goes on and on. I’ve provided the link above so you can look at them at your leisure. Remember, if you don’t want to bother with the whole, unplug your RPi Pico, press and hold the bootsel button, re-plug your USB cable, then release the bootsel to load a different firmware version; you can simply go to the REPL and enter the command “machine.bootloader()”. After a few seconds, the file manager will open so you can drag and drop the new firmware version to that window to load and reboot the microcontroller. It’s a WHOLE lot easier than trying to juggle the microcontroller device and plug in the USB cable. As I said, things are really hopping here at landing pad 2997, so I’m going to close this month’s article. Look forward to some big projects in the future. Until next time, as always; stay safe, healthy, positive and creative!