|
我想自己加一些键位到web上输出指定的串口信息是在这里改吗 具体怎么弄呢 #!/usr/bin/lua
io.output("/dev/ttyATH0")
action = {
["C0"] = function (x) io.write(string.char(0xff,0x00,x,0x00,0xff)) end,
["C1"] = function (x) io.write(string.char(0xff,0x01,0x01,x,0xff)) end,
["C2"] = function (x) io.write(string.char(0xff,0x01,0x02,x,0xff)) end,
["C3"] = function (x) io.write(string.char(0xff,0x01,0x03,x,0xff)) end,
["C4"] = function (x) io.write(string.char(0xff,0x01,0x04,x,0xff)) end,
["C5"] = function (x) io.write(string.char(0xff,0x01,0x05,x,0xff)) end,
["C6"] = function (x) io.write(string.char(0xff,0x01,0x06,x,0xff)) end,
["C7"] = function (x) io.write(string.char(0xff,0x01,0x07,x,0xff)) end,
["C8"] = function (x) io.write(string.char(0xff,0x01,0x08,x,0xff)) end,
}
action[string.sub(os.getenv("QUERY_STRING"),1,2)](string.sub(os.getenv("QUERY_STRING"),3,5))
还有就是看了http://hi.baidu.com/szqkfsskk/item/99b6a484866d6ed5d1f8cdcd这教程里说要没后缀的UNIX格式的文件该怎么弄 那两个软件试了还是不行
|
|