pxt-microbit/docs/reference/devices/on-gamepad-button.md

722 B

On Gamepad Button

Register code to run when the @boardname@ receives a command from the paired gamepad.

~hint

App required You must use one of the micro:bit apps to use this functionality.

~

devices.onGamepadButton(MesDpadButtonInfo.ADown, () => {})

Parameters

  • body: Action code to run when the the @boardname@ receives a command from the paired gamepad.

See Also

tell remote control to, raise alert to, signal strength, on signal strength changed

devices