1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-13 08:40:26 +01:00
RIOT/examples
2024-11-27 11:57:20 +01:00
..
arduino_hello-world examples/arduino_hello-world: this example needs stdin 2024-11-25 16:17:20 +01:00
asymcute_mqttsn examples,tests: update Makefile.ci 2024-02-12 20:40:31 +01:00
benchmark_udp pkg/lwip: automatically pull in lwip_netdev 2024-04-30 08:41:07 +02:00
bindist examples/bindist: cleanup and fix formatting in README 2019-01-22 07:37:36 +01:00
blinky examples and tests: add atmega8 to relevent Makefile.ci 2023-07-11 21:22:02 +02:00
ccn-lite-relay examples, tests: Changes for the native64 board 2024-02-05 22:02:14 +01:00
cord_ep cord/doc: Update references to RFC 9176 2024-10-18 23:52:35 +02:00
cord_epsim cord/doc: Update references to RFC 9176 2024-10-18 23:52:35 +02:00
cord_lc cord/doc: Update references to RFC 9176 2024-10-18 23:52:35 +02:00
default tree-wide: Introduce netif feature and use it 2024-05-22 10:39:56 +02:00
dtls-echo treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
dtls-sock treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
dtls-wolfssl examples/dtls-wolfssl: Sort Makefile.ci 2024-06-05 22:04:43 +02:00
emcute_mqttsn examples,tests: update Makefile.ci 2024-02-12 20:40:31 +01:00
filesystem examples/filesystem: Increase main stack size 2024-02-29 23:44:17 +01:00
gcoap examples/gcoap: adapt Makefile.ci 2024-08-25 19:45:10 +02:00
gcoap_block_server makefiles, treewide: Remove MCU variable 2024-02-18 20:46:09 +01:00
gcoap_dtls Merge pull request #20554 from fabian18/pr/examples/gcoap_input_URI_and_proxy_fixes 2024-05-14 09:52:49 +00:00
gcoap_fileserver ci: Add tests for examples folder 2024-11-12 16:35:26 +01:00
gnrc_border_router *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
gnrc_lorawan examples,tests: Bump Makefile.ci for MSP430 boards 2024-05-07 07:57:41 +02:00
gnrc_minimal examples,tests: Update Makefile.cis 2023-12-10 13:51:04 +01:00
gnrc_networking boards/weact-g030f6: add new board 2024-02-05 00:45:42 +01:00
gnrc_networking_mac gnrc/ipv6/nib: add Kconfig for static link-local address 2024-01-04 17:45:23 +01:00
gnrc_networking_subnets boards/weact-g030f6: add new board 2024-02-05 00:45:42 +01:00
hello-world makefiles, treewide: Remove MCU variable 2024-02-18 20:46:09 +01:00
ipc_pingpong treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
javascript */Makefile.ci: Add gba_cartridge 2024-04-10 17:06:18 +02:00
leds_shell examples/leds_shell: fix segfault 2024-07-26 17:40:21 +02:00
lorawan examples/lorawan: drop crazy STM32 hack 2024-10-01 15:44:39 +02:00
lua_basic *app.config.test*: Remove kconfig dep files 2024-03-26 14:53:35 +01:00
lua_REPL *app.config.test*: Remove kconfig dep files 2024-03-26 14:53:35 +01:00
lwm2m examples/lwm2m: changes on example application 2024-11-12 08:47:13 +01:00
micropython *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
nanocoap_server sys/net/nanocoap: add and use coap_get_response_hdr_len() 2024-11-05 10:46:02 +01:00
nimble_gatt makefiles, treewide: Remove MCU variable 2024-02-18 20:46:09 +01:00
nimble_heart_rate_sensor pkg/nimble/autoadv: add support for ext_adv 2022-04-27 08:22:58 +02:00
nimble_scanner sys/shell_commands: convert to SHELL_COMMAND() 2022-06-07 09:25:04 +02:00
opendsme examples, tests: update Makefile.ci for AVR8 2023-12-01 19:37:05 +01:00
openthread *app.config.test*: Remove kconfig dep files 2024-03-26 14:53:35 +01:00
paho-mqtt pkg/lwip: automatically pull in lwip_netdev 2024-04-30 08:41:07 +02:00
pio_blink examples/pio_blink: add missing include 2024-11-27 11:57:20 +01:00
posix_select boards/weact-g030f6: add new board 2024-02-05 00:45:42 +01:00
posix_sockets treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
psa_crypto Merge pull request #20598 from mguetschow/psa-hashes-sha512-truncated 2024-05-17 09:20:03 +00:00
riot_and_cpp examples: Use size_t print format specifier 2023-12-21 12:02:34 +01:00
rust-async rust: bump rust-riot-wrappers 2024-11-22 11:14:34 +01:00
rust-gcoap rust: bump rust-riot-wrappers 2024-11-22 11:14:34 +01:00
rust-hello-world rust: bump rust-riot-wrappers 2024-11-22 11:14:34 +01:00
saul examples and tests: add atmega8 to relevent Makefile.ci 2023-07-11 21:22:02 +02:00
senml_saul ci: Add tests for examples folder 2024-11-12 16:35:26 +01:00
skald_eddystone examples/skald_eddystone: explicitly config itvl 2022-05-24 13:02:10 +02:00
skald_ibeacon examples/skald_ibeacon: explicitly configure itvl 2022-05-24 13:02:10 +02:00
sniffer treewide: remove THREAD_CREATE_STACKTEST from thread creation 2024-07-29 11:45:58 +02:00
sock_tcp_echo examples/sock_tcp_echo: add TCP echo client / server 2024-11-12 00:22:38 +01:00
spectrum-scanner boards/weact-g030f6: add new board 2024-02-05 00:45:42 +01:00
subfolders docs: link to subfolders example in documentation 2024-11-04 11:15:28 +01:00
suit_update suit: move CoAP endpoints to the example 2024-11-26 19:49:20 +01:00
telnet_server examples: Create a proper Table of Content 2024-11-12 16:17:03 +01:00
thread_duel examples: Create a proper Table of Content 2024-11-12 16:17:03 +01:00
timer_periodic_wakeup examples/readme: Improve clarity and adjust categories 2024-11-12 16:18:49 +01:00
twr_aloha examples/twr_aloha: make use of event_callback_post() 2024-08-29 17:23:30 +02:00
usbus_minimal examples/usbus_minimal/Makefile: remove unneeded SHOULD_RUN_KCONFIG 2020-11-04 09:35:35 +01:00
wasm Merge pull request #20335 from fzi-haxel/pr/native64-board 2024-02-05 22:58:02 +00:00
.gitignore examples,tests: ignore core dumps via .gitignore 2022-08-31 15:05:14 +02:00
README.md examples/readme: Add subfolders example to categories 2024-11-13 15:02:26 +01:00

Examples

RIOT provides a wide range of examples to demonstrate the capabilities of the OS and its modules.

Each example contains a README.md that provides information and instructions how to run it.

Here is a quick overview of the examples available in the RIOT:

The Essentials

Example Description
default This application is a showcase for RIOT's hardware support. Using it for your board, you should be able to interactively use any hardware that is supported.
hello-world A simple "Hello World" that shows the basic structure of a RIOT application.
blinky The classic "Hello World" example for embedded systems: blinking an LED (or printing "Blink!" via stdio when none are available).
leds_shell The application leds_shell is a basic example, which allows easy, interactive control of internal board LEDs, and basic GPIO for externally connected simple devices (for e.g. additional LEDs, relay, motors - via dedicated drivers, etc.) via the shell.
saul This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module.
timer_periodic_wakeup How to set up a periodic wakeup timer using the RIOT operating system.
ipc_pingpong This example is to illustrate the usage of RIOTs IPC messaging system.
filesystem This example showcases ways to interact/manage the filesystem in RIOT.
subfolders This example demonstrates how to use subfolders in RIOT applications.

RIOT Language Bindings

Officially Supported/Targeted

Rust
Example Description
rust-hello-world This example demonstrates how to write a simple RIOT application in Rust.
rust-gcoap This example demonstrates how to write a coap server application in Rust using the RIOTs gcoap module.
rust-async This example demonstrates how to use Rusts async/await syntax in a RIOT application.
C++
Example Description
riot_and_cpp Example of using C++ in RIOT applications.

Community Supported

Example Description
javascript How to write IoT applications using javascript using JerryScript.
lua_basic How to write IoT applications using Lua.
lua_REPL This example demonstrates how to use the Lua Read-Eval-Print Loop (REPL) in RIOT.
micropython How to use the MicroPython port for RIOT.
wasm How to use WebAssembly in RIOT.
arduino_hello-world This application demonstrates the usage of Arduino sketches in RIOT.

Networking

Constraint Application Protocol (CoAP)

Example Description
gcoap This example demonstrates the usage of the gcoap module, a high-level API for CoAP (Constrained Application Protocol) messaging.
gcoap_block_server CoAP server handling for Block requests, build with gcoap using nanocoap block handling functions.
gcoap_fileserver This example demonstrates the usage of the gcoap module to serve files over CoAP.
gcoap_dtls This example demonstrates the usage of the gcoap module with DTLS.
nanocoap_server This example demonstrates the usage of the nanocoap module, a high-level API for CoAP (Constrained Application Protocol) messaging.

Bluetooth Low Energy (BLE)

NimBLE

Example Description
nimble_scanner This example showcases the usage of the NimBLE BLE stack as a scanner.
nimble_gatt This example application configures and runs the NimBLE BLE stack as simple GATT server.
nimble_heart_rate_sensor This example demonstrates how to implement asynchronous data transfer using GATT notifications by implementing a mock-up BLE heart rate sensor.

Misc BLE Examples

Example Description
skald_eddystone This example demonstrates the usage of Skald for creating an Google Eddystone beacon.
skald_ibeacon This example demonstrates the usage of Skald for creating an Apple iBeacon.

MQTT

Example Description
asymcute_mqttsn This application demonstrates the usage of the Asymcute (MQTT-SN) module in RIOT.
emcute_mqttsn This application demonstrates the usage of the emCute (MQTT-SN) module in RIOT.
paho-mqtt This example demonstrates the usage of the Paho MQTT client library in RIOT.

CoRE Resource Directory

Example Description
cord_ep Example of RIOT's Resource Directory (RD) endpoint module, called cord_ep
cord_lc Example of RIOT's Resource Directory (RD) lookup module, called cord_lc
cord_epsim This example shows how a node can register with a CoRE resource directory

GNRC Networking

Example Description
gnrc_minimal This is a minimalistic example for RIOT's gnrc network stack.
gnrc_networking This example demonstrates the usage of the GNRC network stack in RIOT.
gnrc_networking_subnets This example demonstrates IPv6 subnet auto-configuration for networks on a tree topology.
gnrc_border_router Example of gnrc_border_router using automatic configuration
gnrc_lorawan Send and receive LoRaWAN packets and perform basic LoRaWAN commands
gnrc_networking_mac This example shows you how to try out communications between RIOT instances with duty-cycled MAC layer protocols

DTLS

Example Description
dtls-sock This example shows how to use DTLS sock sock_dtls_t
dtls-echo This example shows how to use TinyDTLS with sock_udp.
dtls-wolfssl This example demonstrates the usage of the DTLS module with the wolfSSL library.

Misc

Example Description
lorawan This application shows a basic LoRaWAN use-case with RIOT.
openthread This example demonstrates the usage of the OpenThread stack in RIOT.
lwm2m Example of a LWM2M client on RIOT
ccn-lite-relay This application demonstrates how to use the Content-Centric Networking stack from CCN-Lite on RIOT
telnet_server Simple telnet server that listens on port 23 over IPv6.
posix_sockets Showcase for RIOT's POSIX socket support
spectrum-scanner This example demonstrates how to monitor energy levels on all available wireless channels
sniffer This application is built to run together with the script ./tools/sniffer.py as a sniffer for (wireless) data traffic.
benckmark_udp This example uses the benchmark_udp module to create a stress-test for the RIOT network stack.
sock_tcp_echo This is a simple TCP echo server / client that uses the SOCK API.

Advanced Examples

Example Description
bindist RIOT allows for creating a "binary distribution", which can be used to ship proprietary, compiled objects in a way that makes it possible to re-link them against a freshly compiled RIOT. This application serves as a simple example.
usbus_minimal This is a minimalistic example for RIOT's USB stack.
suit_update This example shows how to integrate SUIT-compliant firmware updates into a RIOT application.
thread_duel This is a thread duel application to show RIOTs abilities to run multiple-threads concurrently, even if they are neither cooperative nor dividable into different scheduler priorities, by using the optional round-robin scheduler module.
posix_select This example is a showcase for RIOT's POSIX select support
psa_crypto Basic functions of the PSA Crypto API
pio_blink How to use the PIO peripheral on the RaspberryPi Pico to blink an LED.
twr_aloha This example allows testing different two-way ranging algorithms between two boards supporting a dw1000 device. This makes use of the uwb-core pkg.
senml_saul This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module with the SenML (Sensor Measurement Lists) format.
opendsme This example demonstrates the usage of the OpenDSME module in RIOT.