This is the program.
local component = require("component")
local sensor = component.motion_sensor
local sides = require("sides")
local io = require("io")
local term = require("term")
local event = require("event")
sensor.setSensitivity(0.2)
local range=1
------ Functions -----
function close()
local rs1 = component.proxy("bebe4c8f-a23e-4e7a-baec-be0124a0b598")
rs1.setOutput(sides.right,0)
os.sleep(1)
for address in component.list("redstone",true) do
local rs = component.proxy(address)
rs.setOutput(sides.top,15)
end
end
function open()
for address in c