From Test-Scratch-Wiki

(Redirected from Eng:Sensor () (block))

Sensor ()?
2.0 Sensor ().png
Category Sensing (PicoBoards in 2.0)
Type Boolean

The Sensor ()? block is a Sensing block and a Boolean block. The block checks if the button on a PicoBoard is being pressed or the specified port connected; if the button is pressed or the port is connected, the block returns true; if it is not, it returns false.

This block can only be used with a PicoBoard.

This is the only boolean block that can be displayed as a Stage monitor.

Values

The block has the following options in the drop-down menu:

  • button pressed
  • A connected
  • B connected
  • C connected
  • D connected

Example Uses

As this block lets the project communicate with the outside world, it can be used to operate projects without using the keyboard and mouse; instead, the button can be pressed or the ports connected and disconnected.

Some common uses for the Sensor ()? block:

  • Using a physical button to control a project
  • Check if wires are connected properly

See Also

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