This is the documentation for the latest (main) development branch. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Touch Sensor Interrupt

Overview

This example demonstrates the use of a touch sensor interrupt function.

Requirements

Touch sensor keys are connected in the following table:

IO Number IO Nmae touch Number
16 PB0 3
17 PB0 4
18 PB0 5
12 PA12 CMOD
14 PA14 CMC

Building and flashing

Example Location: examples/peripheral/touch_sensor/touch_interrupt

compile, burn, and more, see: get started

Running result

Successfully running will output the following logs

D/dt              [0.038] add device touch_sensor
D/dt              [0.042] add device gpio
touch sensor 5 activated
touch sensor 5 activated
touch sensor 5 activated
touch sensor 5 activated
touch sensor 5 activated
touch sensor 5 activated
touch sensor 5 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 3 activated
touch sensor 4 activated
touch sensor 4 activated
touch sensor 4 activated
touch sensor 4 activated