Sensing

sensing.pressed(DigitalPin.D0)
sensing.read(AnalogPin.A0)
sensing.onPinEvent(DigitalPin.D0, PinEvent.Pressed, function () {})

See also

pressed, read, on pin event