Skip to content

Instantly share code, notes, and snippets.

@markwheeler
Created June 16, 2019 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markwheeler/9b40952baf5c640f777591e981ef34c9 to your computer and use it in GitHub Desktop.
Save markwheeler/9b40952baf5c640f777591e981ef34c9 to your computer and use it in GitHub Desktop.
Simple counter for norns
-- Framerate Test
--
local SCREEN_FRAMERATE = 15
local counter = 1
function init()
local screen_refresh_metro = metro.init()
screen_refresh_metro.event = function()
redraw()
end
screen_refresh_metro:start(1 / SCREEN_FRAMERATE)
end
function redraw()
screen.clear()
counter = counter + 1
if counter > SCREEN_FRAMERATE then counter = 1 end
screen.move(10, 10)
screen.level(15)
screen.text(counter)
screen.update()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment