esp32-lilygo-t5/assets/epaper.lua
arne 8d460d4b04 Implement get_rotation
this also stops the automatic call to `.set_rotation` in `.init`; the default
rotation is landscape.
2025-10-05 09:22:39 +02:00

24 lines
441 B
Lua

local math = require('math')
local paper = require('paper')
paper.init()
paper.set_rotation("portrait")
paper.clear()
local width = paper.get_width()
local height = paper.get_height()
print(
'width: ' .. width,
'height: ' .. height
)
for i = 1, 50 do
x = math.random() * width
y = math.random() * height
r = 24 + math.ceil(math.random() * 12)
paper.fill_circle(x, y, r, math.floor(math.random() * 0xFF))
end
paper.update()