smolOS (pronounced small OS) is an open-source, lightweight MicroPython program that implements a POSIX-style (Linux-like) command line interface for the ESP8266 WiFi microcontroller.
Krzysztof Jankowski (w84death) designed smolOS to be easy to use, allowing the listing and removing of files and also including the smolEDitor which, as its name implies, is a simple text editor.
There are currently eight commands with the familiar ls, cat, and rm, plus ed to launch the text editor, welcome to show the welcome screen above, cls to clear the screen, mhz to set the processor speed to 80 or 160 MHz, and info to display some hardware and software information.
The project looks to be a work in progress, and the developer highlights the editor is at the alpha stage of development, so more features may be implemented over time by Krzysztof himself or by the community of developers. I also assume other microcontrollers could be supported relatively easily, especially the ESP32 family.
You’ll find the source code and instructions to flash MicroPython and load smolOS’s main.py program (currently 186 lines of code, 7.07KB in size) to an ESP8266 board on GitHub.
Via Hackster.io
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
A nice to have would be the GPIO mgmt (interrupt/eventi, I/O, PWM, etc) and curl for REST API.
It seems micropython has sys.argv handling ( https://docs.micropython.org/en/latest/library/sys.html#sys.argv ) and it’s mutable so it might be possible to expand the handling of unknown commands ( https://github.com/w84death/smolOS/blob/main/main.py#L78 ) to import FOOBAR.py and execute their main() with passed arguments. From there, just write a “curl.py” or whatever that wraps micropython’s networking library functions with something that looks like the curl binary…
Well,
I have been using these similar functions of Butzel for years
http://files.butzel.net/opensource/micropython/fs.py
It contains some more functionality:
cp , mv (file management) mkdir, cd, pwd (directories) df (diskfree) wifi-control i2c functions
(an older version placed on github: https://gitlab.com/butzel/mptools)
thanks for mentioning.
please use gitlab to download it
This is not OS, It is pretentious low effort 200 lines of code. Heavy lifting is here done by MicroPython project, and not this “I made this showoff person”.
I would prefer nuttx. It is also a POSIX compatible RTOS and it has mature codebase.
Ok, nice. But what for? It’s a microcontroller, for God’s sake.
I mean, I agree, but early computers like the Sinclair were just as primitive. Esp32 is shown in pic running 80Mhz, Sinclair was 3Mhz .. and it has many times as much memory .. people used those. For something. I dunno.