Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:programmingblocks:buttons [2018/02/20 16:12] – kniwwelino | en:programmingblocks:buttons [2018/05/24 13:59] (current) – [Blocks] kniwwelino | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Buttons ===== | ||
+ | ==== Blocks ==== | ||
+ | |||
+ | === If button was clicked === | ||
+ | {{: | ||
+ | |||
+ | This block detects if the specified button has been clicked and executes the blocks added next to '' | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | === 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 '' | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | === Button was clicked === | ||
+ | {{: | ||
+ | |||
+ | This block detects if the specified button has been clicked (pressed and released). | ||
+ | |||
+ | If this is the case, it returns '' | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | === Button is pressed === | ||
+ | {{: | ||
+ | |||
+ | This block detects if the specified button is currently pressed. If this is the case, it returns '' | ||
+ | |||
+ | Options: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | \\ | ||
+ | === 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 [[en: | ||
+ | |||
+ | \\ | ||
+ | === 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 [[en: | ||
+ | |||
+ | \\ | ||
+ | ==== 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. | ||
+ | |||
+ | {{: |