TICK_MS = 1000 local seconds = 0 local black = gui.color(0, 0, 0) local white = gui.color(255, 255, 255) local red = gui.color(255, 0, 0) function setup() gui.clear(white) gui.drawText("hello from sd card", 10, 10, black, white) gui.drawText("touch the screen", 10, 30, black, white) log.info("hello app started, screen " .. gui.width() .. "x" .. gui.height()) end function on_tick() seconds = seconds + 1 gui.fillRect(10, 50, 120, 20, white) gui.drawText("uptime: " .. seconds .. "s", 10, 50, black, white) end function on_touch(x, y) log.info("touch at " .. x .. ", " .. y) gui.fillCircle(x, y, 6, red) end