Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def copylcd(c, sp)
for n in 1..64 do
rgba = c.getpix(0, n - 1, 128)
for i in 1..16 do
pat = 0
for k in 1..8 do
if rgba[1 + (i - 1) * 4 * 8 + (k - 1) * 4] == 0xff
pat |= 1 << (8 - k)
end
end
sp.write pat.chr
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.