Qwiic HAT for Raspberry Pi Hookup Guide

Introduction

This Qwiic HAT for Raspberry Pi is the quickest and easiest way to utilize SparkFun’s Qwiic ecosystem while still using that Raspberry Pi that you’ve come to know and love. This Qwiic HAT connects the I2C bus (GND, 3.3V, SDA, and SCL) on your Raspberry Pi to an array of Qwiic connectors. It also has a few important pins on the Raspberry Pi broken out for easy access. Since the Qwiic system allows for daisy chaining (as long as your devices are on different addresses), you can stack as many sensors as you’d like to create a tower of sensing power!

Introduction This Qwiic HAT for Raspberry Pi is the quickest and easiest way to utilize SparkFun’s Qwiic ecosystem while still using that Raspberry Pi that you’ve come to know and love. This Qwiic HAT connects the I2C bus (GND, 3.3V, SDA, and SCL) on your Raspberry Pi to an array of Qwiic connectors. It also has a few important pins on the Raspberry Pi broken out for easy access. Since the Qwiic system allows for daisy chaining (as long as your devices are on different addresses), you can stack as many sensors as you’d like to create a tower of sensing power!

Required Materials

To follow along with this hookup guide, you will need any Raspberry Pi with 2×20 male headers.

13825
Raspberry Pi 3

A Pi Zero W will also work but you will need to make sure to solder some male headers to it.

 

Now you probably didn’t buy the Qwiic HAT if you didn’t have any Qwiic products to use with it, right? If you don’t have any Qwiic products, the following might not be a bad place to start.

Finally, you’ll need our handy Qwiic cables to easily connect sensors to your Qwiic HAT. Below are a few options.

Required Setup Tools

As a desktop, these devices are required:

  • USB Mouse
  • USB Keyboard
  • HDMI monitor/TV/adapted VGA
  • 5V Power Supply

Suggested Reading

If you aren’t familiar with our new Qwiic system, we recommend reading here for an overview. We would also recommend taking a look at the following tutorials if you aren’t familiar with them.

51ADFD

I2C

An introduction to I2C, one of the main embedded communications protocols in use today.

 

 

 

 

 

 

 

 

 

Hardware Overview

The Qwiic HAT has 4 Qwiic connect ports, all on the same I2C bus. In addition to this, some of the pins on the Raspberry Pi are broken out for the user.

14459

 

Hardware Assembly

To get started with your Qwiic HAT, simply plug it into the headers on the Raspberry Pi, make sure that the “USB” arrow on the HAT is pointing towards the USB on the Raspberry Pi.

Qwic_Boards_Tutorial-01

Once the HAT is plugged in, you can start plugging in any Qwiic enabled sensors you might have.

 

Qwic_Boards_Tutorial-02

I2C on Raspberry Pi

OS and Library Install

If you’re starting from scratch, with a blank microSD card, you’ll want to install Raspbian. If you’ve already got a working Raspbian system, skip ahead to step 3.

  1. Download the NOOBS image. As of this writing, it’s at version 2.4.4.
  2. Follow the official installation instructions.
  3. Follow the Wiring Pi Instructions to get git, update and upgrade your Rasbpian packages, then install WiringPi.

Be patient – each of these steps takes a while.

Once you’ve got wiringPi installed, run the gpio commands shown below.
>gpio -v
>gpio readall

It should respond with some information about the wiringPi version and the Pi that its running on, then draw a table illustrating the configuration for the pins in the 40-pin connector.

Configuration

Like the SPI peripheral, I2C is not turned on by default. Again, we can use raspi-config to enable it.

  1. Run sudo raspi-config.
  2. Use the down arrow to select 5 Interfacing Options
  3. Arrow down to P5 I2C.
  4. Select yes when it asks you to enable I2C
  5. Select OK and then Finish

Once you return to terminal, enter this command
>ls /dev/*i2c*

The Pi should respond with
/dev/i2c-1

Which represents the user-mode I2C interface.

Read More Info…

Qwiic HAT for Raspberry Pi Hookup Guide

Scroll to Top
Read previous post:
The RockPi 4 closely follows the design
Raspberry Pi clone Rock Pi 4 starts at just $39 but with powerful RK3399 chip

Single-board computer maker Radxa has announced what looks to be the cheapest board to date using the popular Rockchip RK3399...

Close