riot :getting-started:building example
working with saul
SAUL (Sensors/Actuators Abstraction Layer) system
> help
Command Description
---------------------------------------
pm interact with layered PM subsystem
ps Prints information about running threads.
saul interact with sensors and actuators using SAUL
version Prints current RIOT_VERSION
reboot Reboot the node
> version
37165
>
main(): This is RIOT! (Version: 37165)
Welcome to RIOT!
Type `help` for help, type `saul` to see all SAUL devices
> saul
ID Class Name
#0 ACT_SWITCH LED
> saul write 0 1
Writing to device #0 - LED
Data: 1
data successfully written to device #0
>
=========
on a BBC micro-bit v1
saul read 3
2026-03-31 18:49:33,102 # saul read 3
2026-03-31 18:49:33,108 # Reading from #3 (mma8x5x|SENSE_ACCEL)
2026-03-31 18:49:33,110 # Data: [0] 212 mgₙ
2026-03-31 18:49:33,114 # [1] 208 mgₙ
2026-03-31 18:49:33,116 # [2] 996 mgₙ
> help
2026-03-31 18:49:46,336 # help
2026-03-31 18:49:46,340 # Command Description
2026-03-31 18:49:46,343 # ---------------------------------------
2026-03-31 18:49:46,348 # ifconfig Configure network interfaces
2026-03-31 18:49:46,353 # txtsnd Sends a custom string as is over the link layer
2026-03-31 18:49:46,360 # pm interact with layered PM subsystem
2026-03-31 18:49:46,365 # ps Prints information about running threads.
2026-03-31 18:49:46,371 # saul interact with sensors and actuators using SAUL
2026-03-31 18:49:46,375 # version Prints current RIOT_VERSION
2026-03-31 18:49:46,378 # reboot Reboot the node
> ifconfig
2026-03-31 18:49:53,313 # ifconfig
2026-03-31 18:49:53,318 # Iface 3 HWaddr: C1:79 Channel: 0 NID: 0xaffe
2026-03-31 18:49:53,323 # TX-Power: 0dBm State: IDLE
2026-03-31 18:49:53,326 # L2-PDU:200
2026-03-31 18:49:53,330 # Link type: wireless
2026-03-31 18:49:53,331 #
> pm
2026-03-31 18:49:59,072 # pm
2026-03-31 18:49:59,073 # Usage:
2026-03-31 18:49:59,075 # pm off: call pm_off()
> saul
2026-03-31 18:50:06,883 # saul
2026-03-31 18:50:06,885 # ID Class Name
2026-03-31 18:50:06,887 # #0 SENSE_BTN Button A
2026-03-31 18:50:06,889 # #1 SENSE_BTN Button B
2026-03-31 18:50:06,891 # #2 SENSE_TEMP NRF_TEMP
2026-03-31 18:50:06,893 # #3 SENSE_ACCEL mma8x5x
> saul read 2
2026-03-31 18:50:18,904 # saul read 2
2026-03-31 18:50:18,908 # Reading from #2 (NRF_TEMP|SENSE_TEMP)
2026-03-31 18:50:18,911 # Data: 29.75 °C
> saul read 2
2026-03-31 18:59:30,265 # saul read 2
2026-03-31 18:59:30,287 # Reading from #2 (NRF_TEMP|SENSE_TEMP)
2026-03-31 18:59:30,288 # Data: 30.25 °C
>
Start project here