SparkFun Qwiic Button Hookup Guide
Buttons are a great way to add a tactile input to your project but dealing with pull-up resistors, debouncing, polling, and using GPIO pins for each button can be a hassle. Enter the Qwiic Button (Red) and the Qwiic Button Breakout! These breakouts eliminate nearly all the inconvenience of using buttons by converting everything to an easy-to-use I2C connection using the Qwiic Interface.
We have two versions of the Qwiic Button available. The Qwiic Button (Red) comes with a pre-populated red pushbutton with a built in LED to illuminate the button and the Qwiic Button Breakout leaves the button unpopulated so you can choose your own color for your tactile button.
Using the Qwiic Button is as simple as sending the command
button.isPressed() to check the status of the button. In addition to handling status checks and debouncing, the Qwiic Button has a configurable interrupt pin which can be adjusted to activate upon a button press or click. This allows you to trigger specific behavior or functions in your code when the button is used and frees up processing time that would normally be used to constantly poll a button's state.
The Qwiic Button also includes a First-in First-Out (FIFO Queue) which keeps track of when the button was pressed so if you are hosting a game show you can easily keep track of which contestant pressed their button first without needing to constantly poll the buttons!
The Qwiic Button requires a Qwiic-enabled microcontroller:
And you will also need a Qwiic cable:
Or, if you want to use a microcontroller without a Qwiic connector, you can add one using one of our Qwiic Shields, the Qwiic Adapter board, or adapter cables:
Finally, if you are using the Qwiic Button Breakout you'll need to solder a button to the board:
Realistically, you can solder any pushbutton to the Qwiic Button Breakout so long as it fits the button footprint. We have a couple other options available in our Button Category that will work perfectly with the Qwiic Button Breakout.
If you aren't familiar with the Qwiic system, we recommend reading here for an overview:
|Qwiic Connect System|
We would also recommend taking a look at the following tutorials if you aren't familiar with them.