Advertisement

Quick Links

SparkFun Qwiic Button
Hookup Guide
BOB-15932 / BOB-16842 / BOB-15931

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Qwiic Button and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Sparkfun Electronics Qwiic Button

  • Page 1 SparkFun Qwiic Button Hookup Guide BOB-15932 / BOB-16842 / BOB-15931...
  • Page 2 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. SparkFun Qwiic Button - Red LED BOB-15932 SparkFun Qwiic Button - Green LED BOB-16842 SparkFun Qwiic Button Breakout...
  • Page 3: Required Materials

    We have three versions of the Qwiic Button available. The Qwiic Button (Red) and Qwiic Button (Green) come with a pre-populated red or green 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 tactile button.
  • Page 4 ● LED Tactile Button - Green ● LED Tactile Button - Blue 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...
  • Page 5: Suggested Reading

    Suggested Reading 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. ● Button and Switch Basics: A tutorial on electronics' most overlooked and underappreciated component: the switch! Here we explain the difference between momentary and maintained switches and what all those acronyms (NO, NC, SPDT,...
  • Page 6: Hardware Overview

    The LED's anode (positive pin) is connected to an I/O pin on the ATtiny84 so you can turn it on and off as well as control the brightness. If you have the Qwiic Button Breakout, you can choose your own color of button from the selection listed in the Introduction of this guide or any tactile button that fits the footprint on the breakout.
  • Page 7 Qwiic and I C Interface The easiest way to use the Qwiic Button is with the Qwiic connect system. Simply plug in a Qwiic Cable to start talking to it. Qwiic Connectors C Pins Alternatively, you can solder to the I2C pins broken out on the board.
  • Page 8 I2C address. The firmware reads the logic of each address pin so, by closing multiple jumpers, you can modify the Qwiic Button with up to sixteen unique addresses! If you do not want to use the address pins, the address can also be configured using the...
  • Page 9 0x64 A0, A1 & A3 Closed 0x62 A0, A2 & A3 Closed 0x69 A1 & A2 Closed 0x65 A1 & A3 Closed 0x61 A1, A2 & A3 Closed 0x63 A2 & A3 Closed 0x60 All Closed...
  • Page 10 C Pull-Up Resistors Severing the trace on the I2C jumper will remove the 2.2kΩ pull-up resistors from the I2C bus. If you have many devices on your I2C bus you may want to open these jumpers by severing the trace in between the pads.
  • Page 11: Hardware Assembly

    With the Qwiic connector system, assembling the hardware is simple. All you need to do is connect your Qwiic Button to Qwiic-enabled microcontroller with a Qwiic cable. Otherwise, you can use the I2C pins if you don't have a Qwiic connector on your microcontroller board.
  • Page 12 Tactile Button with an integrated LED, remember to pay close attention to the polarity marks on your button and match them to the markings on the top of the Qwiic Button Breakout. If you purchased a tactile button from SparkFun, the anode will be marked with a small "+"...
  • Page 13 Multicolor Button 4-Pack: Qwiic Button Arduino Library The easiest way to install the library is to search for SparkFun Qwiic Button in the Arduino Library Manager tool. You can also manually install the Qwiic Button Library from the GitHub Repository...
  • Page 14: Library Functions

    Library Functions Here is a list of the functions of the library with some quick descriptions of what they do. The examples cover most of the functions so we recommend going through them first. Device Status ● - Sets device begin(uint8_t address = DEFAULT_ADDRESS, TwoWire &wirePort = Wire);...
  • Page 15 Interrupt Status/Configuration ● - Configure the interrupt pin to go LOW while the uint8_t enablePressedInterrupt(); button is pressed (held down). ● - Sets the interrupt to no longer trigger while the uint8_t disablePressedInterrupt(); button is pressed. ● - Configure the interrupt pin to go LOW when the uint8_t enableClickedInterrupt();...
  • Page 16 Arduino Examples In this section we will go over a few of the examples from our Qwiic Button Arduino Library. Here is a full list of all the examples included in the library: ●...
  • Page 17 Example 1: Print Button Status The code for Example1_PrintButtonStatus connects the Qwiic Button to the I C bus and prints the status of the button (pressed or not pressed) to the Serial Monitor. Example 3 Pulse When Pressed Example3_PulseWhenPressed connects the Qwiic Button to the I C bus and runs the Button LED through a configured sequence when the button is pressed.
  • Page 18 Heads up! This example will not change the I2C address if one of the address jumpers is closed. The Qwiic Button will remain at the alternate address set by the address jumpers. Example5_ChangeI2CAddress checks to initialize the Qwiic Button on the I2C bus. If the device ID matches what is expected (0x6F by default), it then will print some helpful information for changing the I2C address and prompt you for an input to change the address.
  • Page 19 You will want to solder to the INT pin and connect it to an interrupt-capable pin. If you just need to quickly prototype a circuit using the INT pin on the Qwiic Button, you can connect to it using something like these Hooks. The photo below demonstrates how to use the IC Hook for a temporary connection.
  • Page 20: Register Map

    You can also download the PDF. The Qwiic Button behaves as a normal I2C device. First write the address of the register you would like to read or write, then follow that I2C command with a Read to read the given...
  • Page 21 Working with Qwiic on a Jetson Nano through Jupyter Notebooks. We've written a Python package to easily get setup and use the Qwiic Button. There are two methods for installing the Python package for the Qwiic Button. 1. Install the all inclusive SparkFun Qwiic Python package.
  • Page 22: Local Installation

    PyPi Installation This repository is hosted on PyPi as the sparkfun-qwiic-button package. On systems that support PyPi installation via pip3 (use pip for Python 2) is simple, using the following commands: For all users (note: the user must have sudo privileges): sudo pip3 install sparkfun-qwiic-button For the current user:...
  • Page 23 # runtine # The name of this device _DEFAULT_NAME = "Qwiic Button" # Some devices have multiple available addresses - this is a list of these addresses. # NOTE: The first address in this list is considered the default I2C address for the # device.
  • Page 24 Note: This package is different from previous packages as the register variables are declared in the object class. # QwiicRFID CLASS VARIABLES #------------------------------------------------------------------------------ ---------------------- # Device ID for all Qwiic Buttons DEV_ID = 0x5D # Registers ID = 0x00 FIRMWARE_MINOR = 0x01 FIRMWARE_MAJOR = 0x02...
  • Page 25 LED_PULSE_OFF_TIME = 0x1D I2C_ADDRESS = 0x1F # Status Flags event_available = has_been_clicked = is_pressed = # Interrupt Configuration Flags clicked_enable = pressed_enable = # Pressed Queue Status Flags pressed_pop_request = pressed_is_empty = pressed_is_full = # Clicked Queue Status Flags clicked_pop_request = clicked_is_empty = clicked_is_full =...
  • Page 26 Class QwiicButton() QwiicButton(address) This Python package operates as a class object, allowing new instances of that type to be made. An __init__() constructor is used that creates a connection to an I2C device over the I2C bus using the default or specified I2C address. The Constructor A constructor is a special kind of method used to initialize (assign values to) the data members needed by the object when it is created.
  • Page 27 For all users (note: the user must have sudo privileges): sudo pip3 install --upgrade sparkfun-qwiic-button For the current user: pip3 install --upgrade sparkfun-qwiic-button Python Examples Note: Work on this section is in progress. We will update the content as soon as we can.
  • Page 28 Arduino Wire Library Reference Page ● Arduino Wire Library (In-Depth) Reference ● Looking for some inspiration for a project using the Qwiic Button? Check out this Geo-Mapping project Brandon J. Williams. Before you go, here are some other tutorials using the Qwiic Connect System you may want to...
  • Page 29 TFMini - Micro LiDAR Module (Qwiic) Hookup Guide The TFMini is a ToF (Time of Flight) LiDAR sensor capable of measuring the distance to an object as close as 30 cm and as far as 12 meters! The TFMini allows you to easily integrate LiDAR into applications traditionally reserved for smaller sensors such as the SHARP GP-series infrared rangefinders.

This manual is also suitable for:

Bob-15932Bob-16842Bob-15931

Table of Contents