
This block requires the micro:bit V2 hardware. If you use this block with a micro:bit v1 board, you will see the 927 error code on the screen.
Set the touch mode for a touch pin or touch button.
pins.touchSetMode(TouchTarget.P0, TouchTargetMode.Capacitive)
You can choose which method you want a touch target (pins or logo) to use to detect a touch. There are two methods used for touch sensing on the micro:bit, capacitive or resistive:
The default touch mode set for the pins is resistive and the default touch mode for the logo is capacitive.

This block requires the micro:bit V2 hardware. If you use this block with a micro:bit v1 board, you will see the 927 error code on the screen.
P0, P1, P2, or logo.capacitive or resistive.Set the touch mode for the logo to resistive.
pins.touchSetMode(TouchTarget.LOGO, TouchTargetMode.Resistive)
input.onLogoEvent(TouchButtonEvent.Pressed, function () {
basic.showString("I can't resist")
})