Capacitive Touch

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 pin A1 is used to play a sound
  • the state of button A7 is checked in a forever loop to switch between red and blue on the neopixels.
You do not have to ground the pins to get it to work!
This guide was first published on Jun 07, 2017. It was last updated on Jun 07, 2017. This page (Capacitive Touch) was last updated on Sep 18, 2019.