Skip to content

Instantly share code, notes, and snippets.

@okyeron
Last active November 15, 2018 23:33
Show Gist options
  • Save okyeron/4d712d5ad37f3f8a2c657bb81ce9d1af to your computer and use it in GitHub Desktop.
Save okyeron/4d712d5ad37f3f8a2c657bb81ce9d1af to your computer and use it in GitHub Desktop.
arc functions example
-- arc test / example functions
local ar = arc.connect()
function init()
ar.all(0) - clear all leds
for i=1,4 do
for j=1,64 do
ar.led(i, j, math.random(15)) -- set all leds to random intensity
end
end
arc_redraw()
end
function ar.delta(n, z)
print (n)
print (z)
end
function ar.key(n, z) -- only works with 2011/2012 arc with pushbutton
print (n)
print (z)
end
function arc_redraw()
ar.refresh()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment