This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Thermostat PI
#4
The example is somewhat outdated. You need to create a user library named pid and copy the code there.
Then load the library in your resident script:
Code:
-- init pid algorithm
if not p then
  require('user.pid')
  p = PID:init({
    current = '1/1/1',
    setpoint = '1/1/2',
    output = '1/1/3'
  })
end

-- run algorithm
p:run()
Reply


Messages In This Thread
Thermostat PI - by XSPA2474KW - 21.09.2021, 14:57
RE: Thermostat PI - by admin - 22.09.2021, 07:34
RE: Thermostat PI - by XSPA2474KW - 22.09.2021, 07:52
RE: Thermostat PI - by admin - 22.09.2021, 07:59
RE: Thermostat PI - by XSPA2474KW - 22.09.2021, 08:45
RE: Thermostat PI - by XSPA2474KW - 24.09.2021, 05:42
RE: Thermostat PI - by admin - 24.09.2021, 07:13
RE: Thermostat PI - by XSPA2474KW - 19.10.2023, 16:56
RE: Thermostat PI - by admin - 20.10.2023, 10:46

Forum Jump: