22 lines
300 B
Lua
22 lines
300 B
Lua
|
|
||
|
local cmd="get temp2\r\n"
|
||
|
local sendDelay=1*1000
|
||
|
|
||
|
sys.taskInit(function ()
|
||
|
while true do
|
||
|
sys.wait(3*1000)
|
||
|
log.info("PA",apiSendUartData(cmd),cmd)
|
||
|
|
||
|
--sys.wait(10*1000)
|
||
|
end
|
||
|
end)
|
||
|
|
||
|
|
||
|
function getinfo()
|
||
|
|
||
|
end
|
||
|
|
||
|
|
||
|
--注册串口接收函数
|
||
|
apiSetCb("uart",getinfo)
|