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?

    • kakes@sh.itjust.works
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      edit-2
      1 year ago

      You’ll need to wire it up either way, so I would suggest doing it without the Pi honestly. Adding a Pi to the equation is just making it more complex for no reason at all, unless the goal is strictly to learn how to use the Pi.

      Like, the circuit “diagram” would just be something like:

      Battery (pos) -> button 1 -> button 2 -> button 3 -> button 4 -> resistor -> electromagnet -> Battery (neg)
      (Though actually, it could be in any order tbh)

      The only difficult part would be figuring out which resistor to use, but you’ll need to do that whether a Pi is involved or not.

      • bufordt@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        1 year ago

        The only justification of using a raspberry pi is if they want to make the box with a whole bunch of buttons and be able to dynamically set which 4 buttons open the box.