User manual
Instruction set
9
if (x % 8) == 0 then
wait(0.01)
end
end
end
-- draw frame
f:write(string.format("\27[%d;%d;%d;%d;%dw", 0, 0, 63, 127, 4))
f:flush()
if (graph_y > 4) and (graph_x > 4) then
f:write(string.format("\27[%d;%d;%d;%d;%dw",
graph_y - 4, graph_x - 4,
graph_y + graph_dy + 3,
graph_x + graph_dx + 3, 0))
f:flush()
f:write(string.format("\27[%d;%d;%d;%d;%dv",
graph_y - 2, graph_x - 2,
graph_y + graph_dy + 1,
graph_x + graph_dx + 1, 0x33))
f:flush()
end
wait(0.01)
calc_graph(0, graph_dx - 1)
while true do
-- clear graph using filled rectange
f:write(string.format("\27[%d;%d;%d;%d;%dw",
graph_y, graph_x,
graph_y + graph_dy - 1,
graph_x + graph_dx - 1, 0))
f:flush()
wait(0.05)
-- shift graph left, add new values
for x = 0, graph_dx - 1 - steps, 1 do
values[x] = values[x + steps]
end
calc_graph(graph_dx - 1 - steps, graph_dx - 1)
-- draw graph
draw_graph(f, 0, graph_dx - 1)
f:flush()
wait(0.05)
-- update screen
f:write("\27[U");
f:flush()
wait(0.05)
end
-- never reach this because of loop for infinity
f:close()
Example3.2.example2.lua
3.3. Additional functions
All other functionality such as controlling IOs, backlight or the display's contrast settings
are gathered in table Table3.4, “Additional functions”.
Command Description Example LUA string
Controlling display settings
i, I Set display background light to num. ESC[0i ESC[255i "\27[128i"
j Set display's contrast to num. ESC[0j ESC[63j "\27[35j"