From 228baf459707bae2ad67029a71fbfad674d7324a Mon Sep 17 00:00:00 2001 From: gretchen Date: Mon, 18 Nov 2019 16:33:03 -0800 Subject: Example and documentation for emacs integration. --- example/example.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 example/example.lua (limited to 'example/example.lua') diff --git a/example/example.lua b/example/example.lua new file mode 100644 index 0000000..e96ba34 --- /dev/null +++ b/example/example.lua @@ -0,0 +1,22 @@ +-- An example script for norns-etc +-- Load this file in emacs and M-x compile to upload. + +function redraw() + screen.clear() + screen.move(64, 32) + screen.text_center("norns example #" .. math.floor(math.random() * 1000)) + screen.update() +end + + +function init() + redraw() +end + +-- This needs to be at the end so that it doesn't conflict with the +-- norns convention of having a script description in comments on the +-- first couple of lines. + +-- Local Variables: +-- compile-command: "make upload" +-- End: -- cgit v1.2.1