Choose a control by what the user is trying to do

A visitor pressing Start, a finger touching a panel and a moving lid reaching its end position can all produce a digital signal. They represent different actions, though, and the choice of control changes how a prototype feels and what it can reliably recognize.

For a team building a first interaction, begin with that distinction. A museum-game discussion on the Arduino forum is about intentional button presses; a mechanism reaching a stop needs a different kind of input. On our bench we ran three separate experiments, a mechanical pushbutton module, a TTP223 capacitive touch module and a lever limit switch, each wired to a Raspberry Pi Pico on a GraftPort carrier and programmed with BIPES blocks that generate MicroPython.

A button gives an explicit action

The pushbutton program read GPIO9 with the internal pull-up enabled. It treated a low reading as pressed, printed a message and waited 200 ms before checking again. The terminal showed repeated messages for as long as the button was held.

That confirms a readable input state in this setup. It is not yet one event per press. Repeated lines are loop passes, not separate presses. If a press should advance a menu or start one game round, the program needs a rule that detects the change from released to pressed, and a way to handle contact bounce.

One wiring note: match the connector to the GPIO the program uses. Wire color alone does not tell you which pin a plug lands on.

Touch changes the physical interface

The TTP223 module is an alternative when a design should respond to a touch surface rather than a moving key. Our test used the bare module on the bench. It does not tell you the sensing distance through a particular plastic, how it behaves with moisture on the surface, or how a finished panel will feel.

Our records for this test were also not consistent. The block program read GPIO6 with pull-up off, which generates a pull-down, and a one-second pause. Our written wiring note named GPIO9, and a saved project file used a shorter delay. The terminal message reused the button test's "pressed" label. None of this changes the sensing technology, but it is exactly the kind of mismatch that makes a result hard to reproduce. Confirm the pin, pull setting and active level on the actual board before reusing the program.

If touch is the right choice, the next test is the module mounted behind the intended panel material, tried with dry and damp fingers and with the enclosure closed.

A limit switch answers a mechanical question

The limit switch has a lever that changes state when it is physically pressed. That helps answer whether a mechanism has reached a position. It does not measure the remaining distance. In our test we pressed the lever by hand; it was not connected to a moving motor, and we did not demonstrate automatic stopping.

Here too the block program and the notes disagreed. The blocks used GPIO6 with pull-up off, an inverted (active-low) test and 20 ms polling, while the notes named a different pin and pull setting. The supported result is that the terminal reported the switch triggering when the lever was pressed. Resolve the connection on your board before reproducing it, and decide the active level from the module's circuit.

A limit switch used as an end stop also needs a defined response: stop the motor, reverse, or report a fault. That behavior has to be tested with the real mechanism moving at real speed.

Choose by action, then test in position

User or mechanism action Control to try first What the bench test does not show
Deliberate start or confirm Pushbutton One event per press, bounce handling
Light touch on a surface Capacitive touch Sensing through your panel, moisture
Mechanism reaches an end Limit switch Stopping behavior with real motion

For the next trial, mount the chosen control in its intended position and let someone try ordinary, hesitant and repeated use. Write down what the program should do on a press, a hold, a release and a restart. Those observations are worth more than treating three digital inputs as interchangeable parts.