在使用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
ESP_EASY固件规则功能使用
下载声明:
本站所有软件和资料均为软件作者提供或网友推荐发布而来,仅供学习和研究使用,不得用于任何商业用途。如本站不慎侵犯你的版权请联系我,我将及时处理,并撤下相关内容!