Input: Twin Button - 图1

What Is It

The twin button has two push-buttons on board labeled as A and B. They can detect events such as a single press, long press or an ongoing press.

How It Works

Push-buttons are a basic form of signal input. When you press down a button, you are actually powering on a circuit and let electric signals pass through. A single button press is a very short time period to power the circuit on and off; and a double button press repeats this action twice; while a long press, extends the time period a bit longer.

Real World Analogy

Key Board, Controller

Codecraft

You can find blocks that control the twin button in the tabs Events and Sensing in Codecraft.

Extension Knowledge

Up to 4 twin buttons can be connected to one mainboard in a time. We can order their numbers according to the switch contacts on the back of them.
Note: The number order should be consistent to that of their contacts.
Input: Twin Button - 图2

Below are the contact images and their number order.
Input: Twin Button - 图3