I made an assumption in reading your requirements that it didn't need to be directional. If it does indeed have to be directional, a flip flop or some other electronic logic would probably be required.
I made an assumption in reading your requirements that it didn't need to be directional. If it does indeed have to be directional, a flip flop or some other electronic logic would probably be required.