Table of Contents

Adding external buttons

External buttons are buttons which can be connected to the Kniwwelino in addition to the buttons A and B already available on the board. Similarily as for the LEDs (cf. Adding external LEDs), those are connected through the pins on the outer area.

To work with external buttons, you need additional material: the buttons, as well as wire to create a closed circuit using the pins of the Kniwwelino.

With the Kniwwelino Blocks, you can then detect when current is flowing, i.e. when the button is pressed.

Connecting external buttons is very similar to connecting external LEDs: you can use either alligator clips or wire.

Connecting external buttons with alligator clips

You need:

To connect the button:

In the following image we connected it to the D5 pin with a yellow alligator clip.

Now your circuit with one external button is closed. You can now program Kniwwelino to detect when current is flowing through this circuit, which will mean that a button was clicked or is pressed.


Connecting external buttons with silicon wire

The process for connecting external buttons is very similar to connecting external LEDs. Please refer to section Adding external LEDs if you would like to have step-by-step instructions of how to attach such components.

You need:

To connect the button(s):

Programming external buttons

You can program the external buttons with the following blocks, listed underneath Buttons:

Select D5, D6 or D7, depending on which pin you used to attach the button.

Use the block as part of an if - then block to execute blocks when a button was clicked or pressed. For example, this code writes “Hello Kniwwelino” on the matrix when an external button on pin D5 was clicked: