How to make a momentary pulse

The Grove-Button have a event api(websocket).
You can use it to check the button is press or not.