local uv = require "lluv"
uv.rs232 = require "lluv.rs232"
local port = uv.rs232('COM3',{
baud = '_9600';
data_bits = '_8';
parity = 'NONE';
stop_bits = '_1';
flow_control = 'OFF';
rts = 'ON';
})
port:open(function(self, err, data)
if err then
print("Port open error:", err)
return self:close()
end
self:start_read(function(self, err, data)
if err then
print("Port read error:", err)
return self:close()
end
io.write(data)
end)
port:write('AT\r\n')
end)
uv.run()
-
Notifications
You must be signed in to change notification settings - Fork 0
Serial port communication library for lluv library
License
moteus/lua-lluv-rs232
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Serial port communication library for lluv library
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published