From 4f485028f9d46f5ba04414600fb5bb401fb806ac Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 10 Mar 2025 21:33:00 -0400 Subject: [PATCH] only:pid example --- firmware/controllers/lua/examples/pid.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 firmware/controllers/lua/examples/pid.lua diff --git a/firmware/controllers/lua/examples/pid.lua b/firmware/controllers/lua/examples/pid.lua new file mode 100644 index 0000000000..880c4583ec --- /dev/null +++ b/firmware/controllers/lua/examples/pid.lua @@ -0,0 +1,7 @@ +industrialPid = IndustrialPid.new(1, 1, 0, 0, 0.5) +industrialControlLoopOutput = industrialPid:get(10, 1) +print('industrialControlLoopOutput: ' ..industrialControlLoopOutput) + +pid = Pid.new(1, 1, 0, 0, 0.5) +controlLoopOutput = pid:get(10, 1) +print('Control Output: ' ..controlLoopOutput)