Updated Lua Scripting (markdown)
This commit is contained in:
parent
b3856b8830
commit
112505d94a
|
@ -197,3 +197,20 @@ Set the duty cycle of the specified PWM channel.
|
|||
``luamemory``
|
||||
|
||||
``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
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue