I'm trying to build a button that can exist in two modes. Either it springs back after being pressed, or it stays pressed. I want to switch between these two modes using some complex logic, controlled by an Arduino or a RaspberryPi. The dimensions should be around 1'-by-1', and I'll have a 5-by-6 grid of these buttons to make a puzzle. I'm struggling to come up with a simple design for one such button.
I thought of using a solenoid, but they have a duty cycle and use a lot of power in one of the two modes. Ideally, I would only need power to switch between the two states. That way, a player can play with the puzzle for a while, then leave it alone overnight and come back to playing the day after. I'd rather not keep the solenoids powered overnight.
Another idea I had was to use two electromagnets to pull some kind of a latch back and forth, to jam the button in its pressed state. But that seems complicated and finicky.