I get double entries from the print("Open/Close door"), but it doesn't really matter. I might omit the messages when I work this into the door/lights opener. It's working as expected now!
Thanks for the help.
Improvements have been made, but it won't keep the door open. the moment I move away from the plate the output on sd.right is set to 0.
Also had to add a 'local event = require("event")' to make it run, but yeah
If I loop it will keep printing "opening door" / "closing door" and it will shut the door the moment I move from the pressureplate.
This was just something I managed to put together to test if the plate would talk to the computer
something that can detect the redstone pulse from a pressureplate to send a pulse to a door, keeping it open until the pressureplate is ran over again.
run over plate -> door opens
run over plate again -> door closes
I managed to create something that will listen to the pressureplate and output RS but I have no idea how to make it toggle the door to stay open
my patience is running out and googlefu isn't returning anything useful
local component = require("component")
local sd = require("sides")
local rs = require("component.redstone")
if rs.getInput(sd.front) == 15 then
p