You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
482 B
14 lines
482 B
-- This script is an example of saying hello. A lot. |
|
-- Pick a random number to send back |
|
local number = math.random() |
|
|
|
function update() -- this is the loop which periodically runs |
|
gcs:send_text(0, "hello, world") -- send the traditional message |
|
|
|
gcs:send_named_float('Lua Float',number) -- send a value |
|
number = number + math.random() -- change the value |
|
|
|
return update, 1000 -- reschedules the loop |
|
end |
|
|
|
return update() -- run immediately before starting to reschedule
|
|
|