Last active
November 15, 2018 23:33
-
-
Save okyeron/4d712d5ad37f3f8a2c657bb81ce9d1af to your computer and use it in GitHub Desktop.
arc functions example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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