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
clickevent on pinA1is used toplay a sound - the state of button
A7is checked in aforeverloop to switch between red and blue on the neopixels.
You do not have to ground the pins to get it to work!
Page last edited June 07, 2017
Text editor powered by tinymce.