WMCommonsRaspberryPi4.png This article or section documents something only available on the Raspberry Pi version of Scratch 3.0.
Button () is ()?
<button (0 v) is [pressed v]?:: extension>
Category Raspberry Pi Simple Electronics
Type Boolean
Introduced in 3.0

The button () is ()? block is a Raspberry Pi Simple Electronics block and a boolean block. Its options are the numbers 0 through 27 for the first input, with each number representing a GPIO pin. The second options are "pressed" and "released". The block returns whether or not specified the LED is pressed or released, depending on the input.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.