Qwiic Switch

Microswitches are an easy way to determine if your robot has hit a wall or if your gantry has reached an endstop, but why would you want to deal with debouncing, polling, and wiring up pull-up resistors? The Qwiic Switch simplifies all of those nasty worries away into an easy to use I2C device! With our Qwiic system using the switch is as simple as calling button.isPressed().

This board is BYOS, or Bring Your Own Switch. It's designed to solder onto existing microswitches, like the endstops on your CNC mill or our Arcade Joystick. We can't guarantee that it'll fit every model, but it fits our microswitches and the dimensioned Eagle files are available in the Hardware Repo. It also has a pin that connects to an external LED, which can be configured for your desired level of blinkiness!

If you need multiple switches for your project, fear not! Each switch has a configurable I2C address, so you can daisy-chain multiple switches over Qwiic and still address each one individually. We've got an example in our Arduino Library that provides a super-easy way to configure your Qwiic Switch to whatever I2C address you desire.

In addition to handling blinking and debouncing the Qwiic Switch has configurable interrupts which can be configured to activate upon a button press or click. This means that code on your microcontroller need not waste valuable processing time checking the status of the switch but instead can run a small function whenever the switch is pressed or clicked! For more information on interrupts check out our guide here!

We've also taken the liberty of implementing a FIFO queue onboard the Qwiic Switch where it keeps an internal record of when the button was pressed. This means that if you happen to be Alex Trebek and you have a network of Qwiic Switches running your Jeopardy Game, you can determine who pushed their button first without polling them constantly! This saves your microcontroller time to do other, more important things - like winning the game itself.

We've written an Arduino library to help you get started quickly. You can download the library through the Arduino library manager by searching 'SparkFun Qwiic Button' or you can get the GitHub repo as a .zip file and install the library from there.

This board is one of our many Qwiic compatible boards! Simply plug and go. No soldering, no figuring out which is SDA or SCL, and no voltage regulation or translation required!

We do not plan to regularly produce SparkX products, so get them while they’re hot!

Experimental Product: SparkX products are rapidly produced to bring you the most cutting edge technology as it becomes available. These products are tested but come with no guarantees. Live technical support is not available for SparkX products. Head on over to our forum for support or to ask a question.


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #134773 / about 5 years ago / 2

    Yay! Almost feels like an instance of "ask and ye shall receive!" ;-)

  • Member #704271 / about 3 years ago / 1

    Buyer beware! Read my review. The FIFO queue functionality of the sparkfun/Qwiic_Button firmware is broken. This bug was reported six months ago and is still not fixed. There's no way to access queued button press and button click timestamps (other than the first and last) without it.

  • djbyter / about 4 years ago / 1

    Some suggestions, after installing 30 of these:

    • I've broken 3 of them so far due to the actual switch pads coming off the board. I feel like you could make those pads slightly bigger (and whatever it takes so it doesn't lift off the board) and that would help greatly.

    • I've been using these also with toggles, but it requires a bit of jimmy rigging. If there were another hole to fit these or these that would be nice

    • The tiny sliver of board on the far side feels like it wants to snap off. I know it's not connected, it's just used for anchoring but if that was slightly wider then it wouldn't feel like it's so fragile.

  • Nice! Could you make one for these? https://www.sparkfun.com/products/11310

    • santaimpersonator / about 4 years ago * / 1

      I'll follow up with the SparkX team, it seems a general use version and/or a toggle switch would be useful.

    • djbyter / about 4 years ago / 1


      I'm about to try and use this for these actually, would it not work right off the bat? Looks like this is designed for a momentary switch, but with code like button.isPressed() - wouldn't that just work without changes?

  • Member #134773 / about 5 years ago / 1

    Drat... they're all gone! Sure hope this one makes it to a "regular" product!

    • santaimpersonator / about 5 years ago / 1

      I believe I saw them building more... I would check back again just in case or you can also backorder them.

  • mariof / about 5 years ago / 1

    The Schematic and Hardware Repo links are not working..

    • santaimpersonator / about 5 years ago / 1

      Hey there, sorry about that.

      • I'll try to get the schematic uploaded again. (We are currently experiencing some server issues; we are working to repair links/recover files.)
      • The GitHub repository was still private. It should be public now and the link should be working.

Customer Reviews

0 out of 5

Based on 0 ratings:

Currently viewing all customer reviews.