From 112505d94ab514d83d7af903d8fc07986949c0b7 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Tue, 19 Oct 2021 10:50:40 -0400 Subject: [PATCH] Updated Lua Scripting (markdown) --- Lua-Scripting.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Lua-Scripting.md b/Lua-Scripting.md index 406d7fb2..efbc9612 100644 --- a/Lua-Scripting.md +++ b/Lua-Scripting.md @@ -196,4 +196,21 @@ Set the duty cycle of the specified PWM channel. ``luamemory`` -``luareset`` \ No newline at end of file +``luareset`` + + +## Examples + +``` +t = Timer.new(); + +function onTick() + auxV = getAuxAnalog(0) + if auxV > 2 then + t:reset(); + end + val = t:getElapsedSeconds(); + + print('Hello analog ' .. auxV .. " " .. val) +end +```