It could be adapted so that a dispenser would fire/a tesla coil would activate under the door (?), essentially any trap comprised with redstone. I'm quite new to computercraft and lua in general, so any improvements/alternatives that could be made feel free to comment!
term.clear()
term.setCursorPos(1, 1)
-- Replace "" wrap with sensor side from computer --
mySensor = sensor.wrap("")
local Itemlist = mySensor.getTargets()
-- Replace "" ItemName with FULL (e.g. for reinforced door item.item.itemDoorAlloy) name --
local ItemName = ""
while true do
Itemlist = mySensor.getTargets()
for value in pairs(Itemlist) do
if ItemName == string.sub(value, 1, -7) then
print("Alert!")
redstone.setOutput("right", true)
sleep(2)
redstone.setOutput("right", false)
else
print(string.sub(value, 1, -7))
end
end
end
Just a small program, but if it was helpful for anyone please mention! I noticed a distinct lack of information about this sensor specifically online, as it doesn't have too many uses











