Slide switch () is in state ()

Introduction

This block can be found under the Robots palette in the extension evive Inbuilt tools. evive has two slide switches both of which have 3 states :

  1. Slide up (state 1)
  2. Slide down (state 2)
  3. Middle (OFF)

This block checks takes the slide switch number (1 or 2) and state to be checked for (Up or Down) as input and returns “True” if the slide switch is in the specified state and “False” if it is not in the specified state.

evive Slide Switch

This block can be used in Arduino Mode as well as in Scratch Mode.
Slide switch () is in state ()
Slide switch () is in state ()
Category: evive Inbuilt

Example

  • Sprite move forward if the slide switch 1 is Up, moves backward if the switch is Down else the sprite do not move.

Slide switch scratch mode

  • In this script, if the slide switch 2 is slided up (state 1), the LED on evive (connected to pin 13), glows.

Slide switch arduino mode