explaingit

riot-os/riot

5,718CAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

Open source real-time operating system built for tiny IoT microcontrollers with very limited memory, supporting 200+ hardware boards, wireless networking protocols, and code written in C, C++, or Rust.

Mindmap

mindmap
  root((repo))
    What it does
      IoT firmware OS
      Real-time scheduling
      200 plus boards
    Networking
      IPv6 and CoAP
      LoRaWAN
      Bluetooth LE
    Languages
      C and C++
      Rust
      MicroPython
    Use cases
      Sensor nodes
      Connected devices
      OTA updates
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build firmware for a sensor node that sends temperature readings over LoRaWAN to a cloud server.

USE CASE 2

Create a Bluetooth Low Energy device that responds to commands sent from a smartphone app.

USE CASE 3

Develop an IPv6-connected IoT device that can receive secure over-the-air firmware updates.

USE CASE 4

Port existing Unix-style C code to run on a microcontroller with real-time task scheduling.

Tech stack

CC++RustMicroPythonARMRISC-VESP

Getting it running

Difficulty · hard Time to first run · 1h+

Requires a cross-compilation toolchain for the target architecture and physical hardware or an emulator to run firmware.

Use and link freely including in proprietary products, but any changes you make to RIOT's own source code must be shared under the same LGPLv2.1 license.

In plain English

RIOT is an open-source operating system built specifically for small, low-power devices in the Internet of Things. Unlike a general-purpose operating system like Linux, RIOT is designed to run on microcontrollers, which are tiny chips with very limited memory and processing power. It supports chips using 8-bit, 16-bit, and 32-bit architectures and runs on more than 200 different boards from manufacturers that use processors from ARM, RISC-V, ESP, and others. The project focuses on being efficient with energy and memory, responding to events in real time, and providing a consistent programming interface no matter which hardware you are using. Developers write code in C, C++, or Rust and can call standard POSIX functions, which are familiar to anyone who has written Unix-style software. Optional runtimes for MicroPython, a JavaScript variant, and WebAssembly are also available for those who prefer those languages. Networking is a large part of what RIOT offers. It supports a wide range of protocols suited to IoT environments, including IPv6, UDP, TCP, Bluetooth Low Energy, LoRaWAN (a long-range, low-power radio protocol), CoAP (a lightweight request-response protocol designed for constrained devices), and MQTT (a publish-subscribe messaging protocol). These cover communication over short-range radio, long-range radio, and wired or cellular connections. Beyond networking, RIOT includes a scheduler that manages tasks with priorities and real-time timing, a file system layer, drivers for common hardware interfaces like SPI and I2C, and support for displays, GPS receivers, sensors, motors, and other peripherals. Security features include over-the-air firmware updates, encrypted communication via DTLS, and a standardized cryptography interface. RIOT is developed by an international community, governed by a published governance document, and licensed under LGPLv2.1, which allows it to be linked with proprietary code. The project provides a getting-started guide, beginner tutorials, and an online course for new contributors.

Copy-paste prompts

Prompt 1
I'm using RIOT OS on an ARM Cortex-M board. Write a C application that reads temperature from an I2C sensor every 30 seconds and sends it via CoAP to a server. Include the Makefile with the right RIOT modules enabled.
Prompt 2
Set up a RIOT OS application that connects to a LoRaWAN network using OTAA authentication and publishes sensor readings. Show the main.c and how to configure the OTAA keys.
Prompt 3
I want to enable OTA firmware updates on my RIOT device over DTLS. List the modules I need to enable in the Makefile and show a minimal working configuration.
Prompt 4
Write a RIOT OS program with two threads: one blinks an LED at 1Hz using the RIOT scheduler, and another at lower priority detects a button press and doubles the blink rate.
Open on GitHub → Explain another repo

← riot-os on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.