Skip to content

Instantly share code, notes, and snippets.

@comdet
Last active February 9, 2023 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save comdet/43884551c60256df53495352e3e7f75c to your computer and use it in GitHub Desktop.
Save comdet/43884551c60256df53495352e3e7f75c to your computer and use it in GitHub Desktop.
local tobectrl = {
["base_type"] = "gpio-output",
["pin"] = 4
}
sys.timerLoopStart(function()
log.info("test test")
sensors.control(tobectrl, 1)
sys.wait(2000)
sensors.control(tobectrl, 0)
sys.wait(2000)
end,1000)
sys.taskInit(function()
while true do
local my_string = "abcdefghijklmnopqrstuvwxy"
print(my_string:swapPair(3))
sys.wait(5000)
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment