ESP_EASY固件规则功能使用

admin 2017-10-18 1668 0

在使用espeasy固件时可以使用自带的规则功能实现gpio口本地自动化控制,首先在固件高级功能中打开规则功能。

然后在规则设置上填入,PS规则不支持if嵌套

on System#Boot do    //系统重启时执行
timerset 1,5        //设置定时器1定时5秒溢出
endon
on rules#timer=1 do   //当timer 1溢出时执行
 if [door_test#Switch]=1       //当第一个设置为1时执行
  gpio,16,[door_test#Switch]//Action if button is short pressed
timerset 1,5
 else
  gpio,16,[door_test#Switch]  //Action if button is still pressed
timerset 1,5
 endif
endon



///cnde
还没有人收藏过本帖~
最新回复 (0)
只看楼主
全部楼主
回复
登录发表 or 还没有账号?去注册