i am building a circuit that uses a mechanical gate that will be opened by a solenoid. it will be opened by using the swithces on the 8051 microprocessor and then on the other side i am using a proximity switch to sense if anything is there and open if there is. Can anyone assist on the best route to take with this?