So as is always the way I've had an idea which is a really good idea.
I've built myself a workshop however I don't want a visible lock on the door so naturally I'm going to make it a vault locking door because why not.
My plan so far is to use a RFID reader connected to a rpi which will open a command and send it to a 3d printer controller board with a custom version or marlin on it. Basically marlin that just moves 5 motors back and forth. Each rod will have a start and end endstops to make sure it's locked or unlocked.
My question is this, is it possible to write an stl script that if the endstop at one position is detected it will move in the other direction to the other endstops?
I ask because the script on the pi wouldn't be able to tell if the door is locked or unlocked or can an endstop be connected to a rpi then I can write 2 scripts depending on if the door is locked or unlocked?