![]() |
nRF5 SDK
v13.0.0-1.alpha
|
Choose documentation: | nRF5 SDK | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API |
The LED softblink library provides functions to generate and configure a changing pulse-width modulated output signal that can be used to smoothly blink LEDs.
The library uses the Low-power PWM library to generate the signal.
Key features include:
Only one instance of LED softblink can be used at a time. If you require more instances, use the Low-power PWM library directly.
This library uses an application timer and is therefore not very accurate. It can be used to control LEDs, but for peripherals that need a high accuracy, you should use the PWM library instead.
Complete the following steps to start LED softblink on the default LEDs:
The following code example shows how to initialize LED softblink with the default configuration and start blinking the LEDs:
As a result, the LEDs should start blinking smoothly.
See the LED Softblink Example for a full application that uses the LED softblink library.
LED softblink uses RTC. Therefore, it is less accurate when used with a SoftDevice.