37.6 MicroPython

Python is the operating system (OS) on the pyboard. The OS has a small file system, a command prompt (python), and an object system to manage peripherals.

Introductory YouTube: https://youtu.be/5LbgyDmRu9s

sudo snap install micropython

AdaFruit Feather STM32F405 costs about AUD $40. Connecting through the USB-c to a computer’s USB port, we see from lsusb:

Bus 003 Device 018: ID f055:9800 MicroPython Pyboard Virtual Comm Port in FS Mode

It presents itself as a flash drive called PYBFLASH:

ls /media/kayon/PYBFLASH/
total 145K
1.0K boot.py           8.0K main.py 
3.0K pybcdc.inf        1.0K README.md
[...]

If an SD card is inserted then that is exposed rather than the flash drive.

ls /media/gjw/BE9B-556E/

The operating system is accessible via a serial port:

ls -l /dev/ttyACM0
crw-rw----  1 root dialout 166, 0 Nov 13 08:22 /dev/ttyACM0


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0