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.

how to charge fluorescent sign
#4
Create a User library called rooms. Modify rooms table as needed. You can add any number of rows.

Code:
rooms = {
  { status = '1/1/1', output = '1/1/2' },
  { status = '2/1/1', output = '2/1/2' },
  { status = '3/1/1', output = '3/1/2' },
  { status = '4/1/1', output = '4/1/2' },
  { status = '5/1/1', output = '5/1/2' },
  { status = '6/1/1', output = '6/1/2' },
}

function setrooms(value)
  for _, room in ipairs(rooms) do
    local status = grp.getvalue(room.status)
    if not status then
      grp.write(room.output, value)
      os.sleep(0.2)
    end
  end
end

Turn on:
Code:
require('user.rooms')
setrooms(true)

Turn off:
Code:
require('user.rooms')
setrooms(false)
Reply


Messages In This Thread
how to charge fluorescent sign - by benthoma - 31.08.2019, 08:49
RE: how to charge fluorescent sign - by admin - 03.09.2019, 08:54
RE: how to charge fluorescent sign - by admin - 05.09.2019, 06:26

Forum Jump: