Digitally read the specified [pin](/microbit/device/pins) (``P0``, ``P1``, ``P2``, ...) as digital. **Some pins are also used by the display, read the [pin documentation ](/microbit/device/pins) carefully.**
```sig
pins.digitalReadPin(DigitalPin.P3)
```
### Parameters
* name - the pin name ``P0``, ``P1``, ``P2``, ...
### Returns
* [Number](/microbit/reference/types/number) - 0 or 1
### Example: football score keeper
The following example reads `P0` to determine when a goal is scored. When `P0 = 1`, the code uses `digital write pin` to play a buzzer sound: