Example application

This is a full example application which will work with a Stream Deck Mini, load the 6 buttons, and show a message on the console when a button is pressed and released. its also showing how to load a button dynamically

uv=require("luv")

local e=require("elgato-lib")
local b=require("barionet-io")

relays= {0,0,0,0}

--[[
* * * * helper function: dump_block * * * *
* this function will hexdump a block *
* *
* argument: block to dump *
* result: block output to the console *
* * * * * * * * * * * * * * * * * * * * * *
]]--

dump_block=function(buf)
local prbuf=""
for i=1,buf:len() do prbuf=prbuf .. string.format("%02X ",buf:byte(i)) end
print(prbuf)
end


--[[
* * * * main function: keypress * * * * * *
* this function will be called when a *
* key on the elgato is pressed *
* *
* argument 1: key number (1..) *


On This Page
Example application