Samples

The nRF Connect SDK provides samples that specifically target Nordic Semiconductor devices and show how to implement typical use cases with Nordic Semiconductor libraries and drivers.

Samples showcase a single feature or library, while Applications include a variety of libraries to implement a specific use case.

Zephyr also provides a variety of Samples and Demos, including very simple Basic Samples. These samples are a good starting point for understanding how to put together your own application. However, Zephyr samples and applications are not tested and verified to work with the nRF Connect SDK releases.

General information about samples in the nRF Connect SDK
  • If you are working with embedded devices, it is a good practice to first test your setup by programming an unchanged sample to your development kit.

  • Some samples in the nRF Connect SDK are currently not designed to work out-of-tree. You may need to manually configure your sample to work correctly in the nRF Connect for VS Code extension.

  • All samples in the nRF Connect SDK use Fatal error handler library and are configured to perform a system reset if a fatal error occurs. This behavior is different from how fatal errors are handled in the Zephyr samples. You can change the default behavior by updating the configuration option CONFIG_RESET_ON_FATAL_ERROR.

  • All samples in the nRF Connect SDK are tested and verified in accordance with their maturity level.

Note

Code found in the samples/common are not intended to be used independently, but in addition to other compatible samples for development purposes. For example, the file path samples/common/mcumgr_bt_ota_dfu contains the source for the CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU Kconfig option. This Kconfig option can be used with specific Nordic Semiconductor devices to enable MCUmgr to perform firmware over-the-air (FOTA) updates using Bluetooth® Low Energy.

If you want to list samples available for one or more specific boards, use the nRF Connect for Visual Studio Code extension to filter them.