top of page

Brick Buttons Block


  • The button block is basically an input where you can input data by using any of the button which are ticked above. What are the ways to make good use of this block?



  • Combined with a switch, we can set different outcomes when we use different buttons. For example, we can press the left button to create the sound “Left” or we can press the start button to create the sound “Start”. As you can see they are labelled by the numbers 1 and 2 respectively which is the numbering for the type of button used.

  • How can we apply this? Instead of sound blocks, we could replace it with a variable to store data. Different data will be stored depending on the type of button used. You can decide the pathing of the robot before actually running the robot since every variable will be decided before the robot even runs. For example, in a situation where the robot has to go either area A, B or C, we can press the button which has the variable that will lead the robot to the area that the user desires for the robot to go.

  • There are a few conditions that could trigger this block which are Released (0) , Pressed (1) and Bumped (2). The differences between this 3 conditions are small but can have a major difference depending on the type of program. Released is when the button is pressed and as soon as you let go of it, it will trigger the block. Pressed happens as soon as pressure is applied on the button. Bumped happens when the button is pressed and then released.

  • You can watch the video below by Flying Penguins to learn more about it.



2 views0 comments

Comments


bottom of page