Never touched a Raspberry Pi before.
I’m creating a simple puzzle box. It will need to be battery operated. There will be four buttons. When, and only when, all four buttons are pressed I want an electromagnet to activate. The magnet will push up a magnet on top of it in a tube.
What do I need to make this?
I’m late to the party on this, but I would agree with the others that Raspberry Pi is not only overkill, but will make this more difficult than it needs to be.
It’s a great job for a basic microcontroller, and the code needed for that will be simpler. You just need something like an Arduino, some wire, a few resistors and 4 buttons. Look at any intro to Arduino introduction that gets to button presses (and debouncing). Here’s a good guide from the start: https://learn.adafruit.com/ladyadas-learn-arduino-lesson-number-1/introduction
If you want to follow a guide end to end and can customize the code, this might be a helpful starting point with a very compact board: https://learn.adafruit.com/arcade-button-control-box/overview