You need a loop.
Otherwise the program will return before you step on the plate.
` require("component.redstone") ` is wrong.
"component" is the library with a variable called redstone.
You have to write ` require("component").redstone `
local component = require("component")
local sd = require("sides")
local rs = require("component").redstone
while true do
if rs.getInput(sd.front) == 15 then
print("Opening door")
rs.setOutput(sd.right, 15)
else
print("Closing door")
rs.setOutput(sd.right, 0)
end
end
You can stop the programm with: Ctl + Alt + C (terminate)