A Push-to-Make Switch is a simple switch which completes a circuit when it is pushed down – hence the name. When used with the Crumble, you can trigger other events to occur when the switch is pressed.
To use the switch, you just need to connect one end to a power output (+) and then the other end to an input ( A, B, C or D).
Note: Don’t forget you will need to add batteries.
We use this block to monitor our chosen input. Whenever the button is pressed, current will be going through your chosen input e.g. B. You can change the options by clicking the letter or HI.
In this code, whenever B is HI (switch pressed down), the motor will run in forwards. When the switch isn’t pressed, the motor will stop – it will do this indefinitely.
Here is the push switch in action.