| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Pin Change Interrupt Example

The Pin Change Interrupt Example demonstrates interrupts on PIN_IN change. PIN_OUT is configured as output and toggled in the PIN_IN change interrupt handler.

The application starts with configuring the pins and configuring GPIOTE to give an interrupt on PIN_IN change. The interrupt handler toggles PIN_OUT (LED 1) when PIN_IN (button 1) is pressed or released.

# Setup

You can find the source code and the project file of the example in the following folder: `<InstallFolder>\examples\peripheral\pin_change_int`

LED assignments:

- LED 1 is toggled by interrupt.

Button assignments:

- Button 1 triggers interrupt that toggles LED 1.

# Testing

Test the Pin Change Interrupt Example application by performing the following steps:

1. Compile and program the application.
2. Press button 1 and check if LED 1 toggles.