In this lesson, we are going to explore some of the coding concepts for the Wind Turbine you are going to code next. Take a look at the blocks below, they will be used to code your project in the next section.
Input Blocks
Sometimes when we’re making computer programs, we want something special to happen, but only when we tell it to. It’s like when we want a robot to move, but only when we say ‘go’ or turn a dial.
In our code, we use an input code block called ‘On __ turned by __’ or ‘On ___ Press.’ The ‘dial1’ name refers to which component we’re talking about (if we had more than one dial connected). And the arrow refers to the direction in which the dial is being turned – clockwise, or counterclockwise.
When we use this special code, the instructions inside it will only work when we turn the knob or press the button. These types of blocks are also known as ‘input‘ blocks.