flm01/mote/v1/openwrt/package/flukso/src/load.lua
Bart Van Der Meerssche 3a28838b29 change repository layout
2010-07-07 16:37:03 +02:00

14 lines
297 B
Lua
Executable file

#! /usr/bin/env lua
require 'socket'
local fd = assert(io.open('/dev/ttyUSB0', 'w'))
for i = tonumber(arg[1]), tonumber(arg[2]) do
local data = 'pls ' .. arg[3] .. ':' .. string.sub(string.rep('0', 10) .. i, -10, -1) .. '\n'
fd:write(data)
socket.select(nil, nil, 0.001)
end
fd:close()