When pin () connected | |
when pin (0 v) connected:: microbit hat | |
Category | micro:bit |
Type | Hat |
Introduced in | 3.0 |
The when pin () connected block is a hat block and a micro:bit block. The block activates when a pin is connected to a wire, crocodile clip or other electronic conductor.
Example Uses
- Triggering an event on the micro:bit
when pin (1 v) connected:: microbit hat display text [Pin 1 is connected!]:: microbit
- Triggering an event on the project's stage.
when pin (2 v) connected:: microbit hat say [Pin 2 is connected!]