代码拉取完成,页面将自动刷新
A serial port debugger tool, with lua script.
this tool is only Chinese and English now, you can help me to translate, thanks!
Get it from Microsoft store:
Portable exe version: GitHub
Appveyor snapshot version: Appveyor Artifacts
return uartData.."\r\n"
return uartData:fromHex()
this script can change 30313233
to 0123
.
json = require("JSON")
t = uartData:split(",")
return json:encode({
key1 = t[1],
key2 = t[2],
key3 = t[3],
})
this script can change a,b,c
to {"key1":"a","key2":"b","key3":"c"}
.
these scripts also work with Quick send bar
you can run your own Lua script on the right, such as llcom's example:
--register serial port receiver function
uartReceive = function (data)
log.info("uartReceive",data)
sys.publish("UART",data)--publish message
end
--create a task, wait for message
sys.taskInit(function()
while true do
local _,udata = sys.waitUntil("UART")--wait for message
log.info("task waitUntil",udata)
local sendResult = apiSendUartData("ok!")--send uart data
log.info("uart send",sendResult)
end
end)
--reate a task, sleep 1000ms and loop
sys.taskInit(function()
while true do
sys.wait(1000)--wait 1000ms
log.info("task wait",os.time())
end
end)
--1000ms loop timer
sys.timerLoopStart(log.info,1000,"timer test")
you alse can use xlua
to use C# codes
request = CS.System.Net.WebRequest.Create("http://example.com")
request.ContentType = "text/html;charset=UTF-8";
request.Timeout = 5000;
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Vivaldi/2.2.1388.37";
response = request:GetResponse():GetResponseStream()
myStreamReader = CS.System.IO.StreamReader(response, CS.System.Text.Encoding.UTF8);
print(myStreamReader:ReadToEnd())--get body
myStreamReader:Close()
response:Close()
you can make your debug automatic
you can click here
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。