button1.clicks()
Get the onboard button status
Return Values
Parameters | Type | Description |
number | int | return value 1 – Single press 2- Double press -1 – Long pressed |
Example
It is controlled by ukitexplore V2 board. When the on-board button is clicked, the red light will be on for 400ms; when the button is double clicked, the green light will be on for 400ms, the long-term time will be on, and the blue light will be on for 400ms. The light is off without pressing.
Last updated