TINKER PiEDESIGN IN INDIA

Push button module with TinkerPie

An extra big button: game controllers, doorbells.

TypeDigital sensors
Connect toany accessory pin (button to GND)
Givestrue while pressed
SimulatorYes: a control appears under the simulated board

How it works

A push button joins two contacts when you press it. The module includes a resistor so the pin reads a clear on or off. TinkerPie reports true while the button is held down.

How to wire it

Signal (DO / OUT / S) to any accessory pin: S1-S4, P10-P13, P43 or P44. Power from 3.3 V where the module allows it.

Code

In blocks: Accessories category in TinkerPie Studio. As code:

// JavaScript
sensors.button(Pin.S1)

// Arduino C++
sensors::button(Pin::S1)

Good to know

Try it in TinkerPie Studio

Similar modules

Questions

Can I try the Push button module without buying one?

Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.

Why does my counter sometimes jump by two?

That is contact bounce. Use the "on button pressed" event, or add a short pause (about 50 ms) after reading a press.