Doing something only once while power remains on?

I’m new to gadget-making and I’ve got a Makey Makey (v1.2) that I plan to use in a variety of puzzles for a library escape room.

Once the player completes the circuit, I would like to trigger a pulse that will do something (use a servo to drop a key down a chute, probably) but stop once the action is completed, even though the circuit will remain closed.

Should I be looking at electronic/mechanical components, or should I be planning to tweak the Arduino firmware so that closing the circuit will send, say, a 1000ms MOUSE_LEFT (turning on power to the D16 pin briefly) and then wait until the circuit is opened before being able to do anything else?

Thanks!

Hello Eulexia.

You can change the keystrokes the [Makey Makey v1.2 sends to a computer but you can’t change the program in the Makey Makey to allow it send a pulse out on a pin.

Provided you have something else that’s able to close a circuit when the correct actions have taken place, you might consider using a [servo along with a [Servo Trigger board to drop your key. You’d just need to fabricate some sort of door that stops the key from being dropped until the correct time. Once it’s time to drop the key, a contact closure would cause the servo trigger to change the position of a servo and that could be used to open the door that holds the key in place.](SparkFun Servo Trigger - WIG-13118 - SparkFun Electronics)](https://www.sparkfun.com/products/11884)](https://www.sparkfun.com/products/14478)

Thanks TS-Chris, it does look like the Servo Trigger could do the job in one-shot mode.

At present I’m entertaining the idea of using [a ROB-11015 solenoid to [release a key from a [small magnet.

The interesting bit is that it looks like I could use [state change detection to implement a one-shot behavior if I can rewrite a bit of the firmware, particularly in sendMouseButtonEvents() — then I could hook up my solenoid to the Mouse Out pin.

On the other hand, a Servo Trigger might be easier if I learned to solder, or if a tiny bit of wire held in place with hot glue would do the trick…](https://www.arduino.cc/en/Tutorial/StateChangeDetection)](Magnet Square - 0.125" - COM-08644 - SparkFun Electronics)](Low power magnetic hold and release mechanism – Wattnotions)](https://www.sparkfun.com/products/11015)