Capacitive pins can be used as buttons similarly to buttons A
and B
. You can use pins A1
, A2
, A3
, A4
, A5
, A6
and A7
.
Events
The input.onEvent
block allows to respond to clicks, double clicks and other classic button events. It can be mounted on any of the capacitive pins. You'd typically use croc-clips to create circuits connected to those pins.
Live data
You can read the live button status using input.isPressed
or input.wasPressed
.
Example
- the
click
event on pinA1
is used toplay a sound
- the state of button
A7
is checked in aforever
loop to switch between red and blue on the neopixels.