smolOS is a tiny (<20KB, <500LOC) and simple 🧪 research ⚙️ operating system ⌨️ written in 🐍 MicroPython for microcontrollers giving user a POSIX-like 📁 environment to play. It came with a set of 🧰 tools and 🪄 demos.
According to the Wikipedia: "An operating system (OS) is system software that manages computer hardware and software resources, and provides common services for computer
programs.". In my own mind it's just an interface that helps user interacts with a computer. In that case
smolOS is an operating system. In more precise definition it is a shell and a collection of scripts that works on top of MicroPython systems. Imagine
command.com to the MS-DOS, bash to Linux. For the end user it
really doesn't matter as long as it transforms a blank microcontroller into a working computer.
My first computer was 486 and a black and white CRT. I was using MS-DOS most of the time and get used to the
command line interface. Now, some 25 years later I'm using Linux on all my computers and still prefer shell for basic stuff like editing, moving files or installing software. I wanted to keep that spirit in the smolOS.
Shell. It's not MS-DOS (command.com) nor bash
equivalent, it's something in between. I wanted to keep all the commands user friendly. For
example instead of UNIX ls and DOS dir I opted for list. From those three only the last says exactly what it does - lists files.
Files. Flat hierarchy. Microcontrollers have few MB of data at best. It's not a place to store documents it's a place to store few scripts to run our project. Having directories makes
things more complicated, users get confused where they are and the whole ".." to go back was always strange. That's why there is no
mkdir or cd.
System should run on any MicroPython supported board but it's tested and developed on
Seeed XIAO RP2040.
The whole system is in one file smolos.py. There are additional tools and demos that are optional.
main system file
text editor (included)
additional tools and demos (optional)
any MicroPython board
NeoPixel 5x5 grid (display)
photo resistor (input)
NeoPixel LED (output)
Real Life Use cases
listing and removing unwanted files on board
checking free space
easy way to write simple programs and run them from the OS
quickly iterating parameters for a program
editing small bugs in programs
having fun with microcontrollers
Changes microcontroller into a small working PC
Homemade for fun and learning
Super small and fast
Easy to use, similar to MS-DOS, POSIX-like environments
List and manipulates files
Text editor included (very basic but capable)
Basic tools and demos included (for NeoPixels, Buzzers, LEDs)
Build on MicroPython with clear code
Stability and simplicity are the main principle behind the code
Free and open-source :)
ansi - Displays ANSI escape codes
life - Game of Life implementation for smolOS (text)
buzz - Simple synth for 1-bit music (requires a buzzer)
bytebeat - Implementation of ByteBeat for a buzzer