Blocks

If button was clicked

This block detects if the specified button has been clicked and executes the blocks added next to then. Each time the button is clicked (pressed and released), the blocks next to then are only executed once.

Options:

  • A: button on the left on the Kniwwelino
  • B: button on the right on the Kniwwelino
  • A and B: both buttons at the same time
  • A or B: either button A or button B


If button was clicked

This block detects if the button A, button B, or button A and B have been clicked and executes in each case the blocks added next to corresponding then. Each time a button is clicked (pressed and released), the blocks next to the corresponding then are only executed once.

Options:

  • A: button on the left on the Kniwwelino
  • B: button on the right on the Kniwwelino
  • A and B: both buttons at the same time
  • A or B: either button A or button B


Button was clicked

This block detects if the specified button has been clicked (pressed and released).

If this is the case, it returns true, otherwise it returns false. It can, for instance, be used as part of a if - then block or a repeat until loop.

Options:

  • A: button on the left on the Kniwwelino
  • B: button on the right on the Kniwwelino
  • A and B: both buttons at the same time
  • A or B: either button A or button B


Button is pressed

This block detects if the specified button is currently pressed. If this is the case, it returns true, otherwise it returns false. It can, for instance, be used as part of a if - then block or a repeat until loop.

Options:

  • A: button on the left on the Kniwwelino
  • B: button on the right on the Kniwwelino
  • A and B: both buttons at the same time
  • A or B: either button A or button B


External button was clicked

This block detects if an external button on the specified pin was clicked (pressed and released). It can be used in the same way as the internal buttons.

Please refer to Adding external buttons for getting more information on how to attach and program external buttons.


External button is pressed

This block detects if an external button on the specified pin is currently pressed. It can be used in the same way as the internal buttons.

Please refer to Adding external buttons for getting more information on how to attach and program external buttons.


Example

The following example shows you how to use both of the buttons in your program. When clicking button A, a smiling face is shown. When clicking on button B, a sad face is shown.