mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
add uiflow timer usage
This commit is contained in:
@@ -187,4 +187,32 @@ Get current system run time.
|
||||
|
||||
>Add the Wait Block to the program that needs to be delayed and set the time. When the program executes to it, it will play a delay.
|
||||
|
||||
><img src="/image/Program_structure/Wait_user.gif" width="50%">
|
||||
><img src="/image/Program_structure/Wait_user.gif" width="50%">
|
||||
|
||||
|
||||
# Timer
|
||||
_____________________________
|
||||
|
||||
#### Function Description
|
||||
|
||||
>Timer is a timer function that can be run into the program block periodically.
|
||||
|
||||
><img src="/image/Program_structure/Timer.png" width="20%">
|
||||
|
||||
* __Timer callback__
|
||||
Timer callback function, executed regularly
|
||||
|
||||
* __Start period ms mode__
|
||||
The timer is started to run at the specified time interval. There are two setting modes, One_shot is executed once, and periodic is executed periodically.
|
||||
|
||||
* __Set period ms mode__
|
||||
Modify the time parameter and running mode of the specified timer.
|
||||
|
||||
* __Stop__
|
||||
Stop timer.
|
||||
|
||||
#### Usage
|
||||
|
||||
>Add two timers, count separately according to time parameters.
|
||||
|
||||
><img src="/image/Program_structure/Timer_user.gif" width="50%">
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 417 KiB |
@@ -181,4 +181,34 @@ _____________________________
|
||||
|
||||
>将Wait Block添加到需要延时的程序之间并设定时间,在程序执行到它时,就会发挥延时作用
|
||||
|
||||
><img src="/image/Program_structure/Wait_user.gif" width="50%">
|
||||
><img src="/image/Program_structure/Wait_user.gif" width="50%">
|
||||
|
||||
|
||||
# Timer
|
||||
_____________________________
|
||||
|
||||
#### 功能说明
|
||||
|
||||
>Timer是一个定时器函数,可以定期进入程序块运行
|
||||
|
||||
><img src="/image/Program_structure/Timer.png" width="20%">
|
||||
|
||||
* __Timer callback__
|
||||
定时器回调函数,定期执行
|
||||
|
||||
* __Start period ms mode__
|
||||
开启定时器以指定的时间间隔运行,设置模式有两种,One_shot为执行一次,periodic为周期执行
|
||||
|
||||
* __Set period ms mode__
|
||||
修改指定定时器的时间参数和运行模式
|
||||
|
||||
* __Stop__
|
||||
终止定时器
|
||||
|
||||
#### 使用方法
|
||||
|
||||
>添加两个定时器,依据时间参数分别计数
|
||||
|
||||
><img src="/image/Program_structure/Timer_user.gif" width="50%">
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user