Tactile switch () pressed

Introduction

This block can be found under the Robots palette in the extension evive Inbuilt tools. evive has two tactile switches; this block checks if either of them is pressed. The switch whose state you want to check can be chosen from the drop down on this block. It is a Boolean block which returns “TRUE” if the switch is pressed and “False” if the switch is not pressed.

evive Tactile Switch Pushbuttons

This block can be used in Arduino Mode as well as in Scratch Mode.
Tactile switch () pressed
Tactile switch () pressed
Category: evive Inbuilt

Example

  • Rotating the sprite if the tactile switch 1 is pressed.

  • The example below checks which one of tactile switches 1 or 2 is pressed and changes the screen colour using the Fill screen with () colour block. If no switch is pressed, the screen remains black.