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 +```