# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/109/661/medium800/adafruit_products_5405_v3_top_ORIG_2022_03.jpg?1647278104)

What's life without a little RISC? This miniature dev board is perfect for small projects: it comes with&nbsp;[our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C port, WiFi, Bluetooth LE, and plenty of FLASH and RAM memory for many IoT projects. What a cutie pie! Or is it... a&nbsp; **QT Py**? This diminutive dev board comes with a RISC-V IoT microcontroller, the&nbsp; **ESP32-C3**!

ESP32-C3 is a low-cost microcontroller from Espressif that supports 2.4 GHz Wi-Fi and Bluetooth® Low Energy (Bluetooth LE). It has built-in USB-to-Serial, but _not_ native USB - it cannot act as a keyboard or disk drive. The chip used here has 4MB of Flash memory, 400 KB of SRAM and can easily handle TLS connections.

The ESP32-C3 integrates a rich set of peripherals, ranging from UART, I2C, I2S, remote control peripheral, LED PWM controller, general DMA controller, TWAI controller, USB Serial/JTAG controller, temperature sensor, and ADC. It also includes SPI, Dual SPI, and Quad SPI interfaces. There is no DAC or native capacitive touch.

There's a minimum number of pins on this chip, it's specifically designed to be low cost and for simpler projects than ESP32-Sx or ESP32 classics with their large number of GPIO. Think of it more as an intended replacement to the ESP8266 than to the ESP32!

With its state-of-the-art power and RF performance, this SoC is an ideal choice for a wide variety of application scenarios relating to the&nbsp;[Internet of Things (IoT)](https://www.adafruit.com/category/342),&nbsp;[wearable electronics](https://www.adafruit.com/category/65), and smart homes.

**Please note:&nbsp;** The C3&nbsp;uses **&nbsp;RISC V** as a core, not Tensilica, and has Bluetooth LE (not classic!). The BLE core supports BT version 5 including Mesh.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/657/medium800/adafruit_products_5405_v2_quarter_ORIG_2022_03.jpg?1647278082)

Pinout and shape are&nbsp;[Seeed Xiao](https://wiki.seeedstudio.com/Seeeduino-XIAO/)&nbsp;compatible, with castellated pads. In addition to the QT connector, we also added an&nbsp; **RGB NeoPixel** ,&nbsp; **a reset button** &nbsp;(great for restarting your program&nbsp;or entering the ROM bootloader), and a button on GPIO 9 for entering the ROM bootloader or for user input

Runs [Arduino with Espressif's ESP32 core](https://github.com/espressif/arduino-esp32) and [you can also run MicroPython on this chipset](https://micropython.org/download/esp32c3-usb/).

![](https://cdn-learn.adafruit.com/assets/assets/000/109/658/medium800/adafruit_products_5405_v2_side_01_ORIG_2022_03.jpg?1647278083)

[OLEDs](https://www.adafruit.com/?q=qt+oled&main_page=category&cPath=1005&sort=BestMatch)!&nbsp;[Inertial Measurement Units](https://www.adafruit.com/?q=qt+imu&main_page=category&cPath=1005&sort=BestMatch)!&nbsp;[Sensors a-plenty](https://www.adafruit.com/?q=qt+sensor&main_page=category&cPath=1005&sort=BestMatch). All plug-and-play thanks to the innovative chainable design:&nbsp;[SparkFun Qwiic](https://www.sparkfun.com/qwiic)-compatible&nbsp;[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)&nbsp;connectors for the I2C bus so you don't even need to solder! Just plug in a compatible cable and attach it to your MCU of choice, and you’re ready to load up some software and measure some light.&nbsp;[Seeed Grove I2C boards](https://www.adafruit.com/product/4528)&nbsp;will also work with this adapter cable.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/659/medium800/adafruit_products_5405_v2_side_02_ORIG_2022_03.jpg?1647278085)

- Same size, form-factor, and pin-out as Seeed Xiao
- **USB Type C connector&nbsp;** -&nbsp;[If you have only Micro B cables, this adapter will come in handy](https://www.adafruit.com/product/4299)!
- **ESP32-C3 32­-bit RISC­-V single­ core processor with 4MB of Flash memory, 400 KB of SRAM**
- Built in USB-to-Serial inside the chip, which can also be used for JTAG programming. This peripheral is not native serial, so not for USB HID, MIDI or MSC: it does reduce cost since a separate converter isnt needed
- Can be used with&nbsp; **Arduino IDE** &nbsp;or **MicroPython**
- **Built-in RGB NeoPixel LED** note that due the small number of GPIO, we could not add a NeoPixel power pin
- Battery input pads on underside with diode protection for external battery packs up to 6V input
- **13&nbsp;GPIO pins:**
  - 11 on breakout pads
  - 5 x 12-bit analog inputs on A0 thru A3 and SDA pin
  - PWM outputs on any pin
  - I2C port, on the breakout pads shared with the STEMMA QT plug-n-play connector
  - Hardware UART which is also the hardware serial debug port
  - Hardware SPI
  - Hardware I2S on any pins

- 3.3V regulator with&nbsp;[**600mA peak output**](https://www.diodes.com/assets/Datasheets/AP2112.pdf)
- Light sleep at 500uA **_,&nbsp;_** deep sleep at ~300uA. Lower power deep-sleep is not possible because we don't have an extra GPIO for disabling the NeoPixel power and we didn't want to share that with any of the IO pads. An engineering trade-off!
- **Reset switch&nbsp;** for starting your project code over, boot 9 button for entering bootloader mode
- **Really really small**

![](https://cdn-learn.adafruit.com/assets/assets/000/109/656/medium800/adafruit_products_5405_v2_iso_ORIG_2022_03.jpg?1647278079)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/109/662/medium800/adafruit_products_bothsides.jpg?1647278300)

The QT Py ESP32-C3 is tiny but packed with features. Here's a detailed look.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/455/medium800/adafruit_products_stemma-circuit.png?1713883230)

[PDF of the PrettyPins diagram on GitHub](https://github.com/adafruit/Adafruit-QT-Py-ESP32-C3-PCB/blob/main/Adafruit%20QT%20Py%20ESP32-C3%20Pinout.pdf)

## Power
- **USB-C port** - This is used for both powering and programming the board. You can power it with any USB C cable.
- **3.3V** - These pins are the output from the 3.3V regulator, they can supply 500mA peak.
- **GND** - This is the common ground for all power and logic.
- **5V** - This is 5v out from the USB port.&nbsp;

![adafruit_products_power.jpg](https://cdn-learn.adafruit.com/assets/assets/000/109/664/medium640/adafruit_products_power.jpg?1647280286)

**You can also use the 5V pin as a voltage _input_ but you must have some sort of diode (schottky, signal, power, really anything) between your external power source and this pin with anode to battery, cathode to 5V pin.**&nbsp; There are two pads on the back, with the protection diode in series, so you could use those if you wish.

Note that you cannot power the USB port by supplying 5V to this pin: there is a protection diode that prevents the 5V from reaching the USB connector (unless you bridge the jumper on the back!). This is to protect host computer USB ports, etc. You can draw 1A peak through the diode, but we recommend keeping it lower than that, about 500mA.

 **BAT/GND**  **pads** - On the back of the board are two pads labeled BAT and GND. These are the battery input pads with diode protection for external battery packs up to 6V input.

![adafruit_products_pads.jpg](https://cdn-learn.adafruit.com/assets/assets/000/109/665/medium640/adafruit_products_pads.jpg?1647280480)

## ESP32-C3 Chip
The **ESP32-C3** is a highly-integrated, low-power, 2.4 GHz Wi-Fi and BLE System-on-Chip (SoC) solution. With its state-of-the-art power and RF performance, this SoC is an ideal choice for a wide variety of application scenarios relating to the [Internet of Things (IoT)](https://www.adafruit.com/category/342), [wearable electronics](https://www.adafruit.com/category/65), and smart homes.

![adafruit_products_chip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/109/666/medium640/adafruit_products_chip.jpg?1647280585)

 **Please note,** this is a single-core 160 MHz chip so it won't be as fast as ESP32's with dual-core. This chip has WiFi and Bluetooth Low Energy, there is no Bluetooth **classic** support. **This chip comes with 4 MB flash and 400 KB of SRAM.** No PSRAM

## Logic Pins
There are eleven GPIO pins broken out to pads. There is hardware I2C, UART, and SPI. The UART pins are also the hardware UART debug port pins.

Five pads are 12-bit analog inputs (A0 thru A3 and SDA).

You can do PWM output or hardware I2S on any pin.

That's the general concept. Now for the details!

![adafruit_products_gpio.jpg](https://cdn-learn.adafruit.com/assets/assets/000/109/667/medium640/adafruit_products_gpio.jpg?1647280763)

There are five analog pins.

- **A0 A1 A2 A3** are ADC1 inputs, and are also GPIO #4, #3, #1, #0 in that order
- **SDA** is an ADC2 input

The I2C pins. **These are shared by the STEMMA QT connector!**

- **SCL** - This is the I2C clock pin. There is _no_ pull-up on this pin, so for I2C please add an external pull-up if the breakout doesn't have one already. GPIO #6
- **SDA** - This is the I2C data pin.There is _no_ pull-up on this pin, so for I2C please add an external pull-up if the breakout doesn't have one already. GPIO #5
- In CircuitPython, you can use the STEMMA connector with&nbsp;`board.SCL` and `board.SDA`, or&nbsp;`board.STEMMA_I2C()`.

The UART interface:

- **RX** - This is the UART receive pin. Connect to TX (transmit) pin on your sensor or breakout. GPIO #20
- **TX** - This is the UART transmit pin. Connect to RX (receive) pin on your sensor or breakout. This is also the hardware UART output so debug information can be emitted from this pad. GPIO #21

The SPI interface:

- **SCK** - This is the SPI clock pin. GPIO #10
- **MI** - This is the SPI **M** icrocontroller **I** n / **S** ensor **O** ut pin. GPIO #8
- **MO** - This is the SPI **M** icrocontroller **O** ut / **S** ensor **I** n pin. GPIO #7

## STEMMA QT Connector
This **JST SH 4-pin [STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connector** breaks out the I2C interface (SCL, SDA, 3.3V, GND). It allows you to connect to [various breakouts and sensors with **STEMMA QT** connectors](https://www.adafruit.com/category/1018) or to other things using&nbsp;[assorted associated accessories](https://www.adafruit.com/?q=JST%20SH%204). It works great with any STEMMA QT or Qwiic sensor/device. You can also use it with Grove I2C devices thanks to [this handy cable](https://www.adafruit.com/product/4528).

![adafruit_products_qt.jpg](https://cdn-learn.adafruit.com/assets/assets/000/109/668/medium640/adafruit_products_qt.jpg?1647280972)

The ESP32-C3 does not have enough pins for a secondary I2C port, so the STEMMA QT connector IO pins are the same as **SDA** and **SCL**!``

## NeoPixel LED
Near the SCK and MI on the silk, is the **RGB NeoPixel LED**. This addressable LED works both as a status LED (in CircuitPython), or can be controlled with code. It is available in CircuitPython as `board.NEOPIXEL`, and in Arduino as `PIN_NEOPIXEL`. It is on GPIO #2

![adafruit_products_neopix.jpg](https://cdn-learn.adafruit.com/assets/assets/000/109/669/medium640/adafruit_products_neopix.jpg?1647281056)

## Buttons
There are two buttons.

- **Reset button** - This button restarts the board and helps enter the ROM bootloader. You can click it once to reset the board without unplugging the USB cable or battery.
- **Boot button** - This button can be used to put the board into _ROM bootloader mode_. To enter ROM bootloader mode, hold down boot button while clicking reset button mentioned above. When in the ROM bootloader, you can upload code and query the chip using `esptool`.   
This button can also be read as GPIO 9 (set it to be an input-with-pullup)

![adafruit_products_buttons.jpg](https://cdn-learn.adafruit.com/assets/assets/000/109/670/medium640/adafruit_products_buttons.jpg?1647284171)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Arduino IDE Setup

We primarily recommend using the ESP32 chipsets with Arduino. Don't forget you will also need to install the SiLabs CP2104 Driver if you are using an ESP32 board with USB-to-Serial converter! (There's no harm in doing it, so we recommend even if you aren't.)

### Install Arduino IDE

The first thing you will need to do is to download the latest release of the Arduino IDE. You will need to&nbsp;be using&nbsp; **version 1.8** &nbsp;or higher for this guide.

[Arduino IDE Download](http://www.arduino.cc/en/Main/Software)
### Install CP2104 / CP2102N USB Driver

Many ESP32 boards have a USB-to-Serial converter that talks to the chip itself, and will need a driver on your computer's operating system. The driver is available for Mac and Windows. It is already built into Linux.

[Click here to download the CP2104 USB Driver](http://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
### Install CH9102 / CH34X USB Driver

Newer ESP32 boards have a different USB-to-serial converter that talks to the chip itself, and will need a driver on your computer's operating system. The driver is available for Mac and Windows. It is already built into Linux.

If you would like more detail, check out [the guide on installing these drivers](https://learn.adafruit.com/how-to-install-drivers-for-wch-usb-to-serial-chips).

[Click here to download the Windows driver](http://www.wch-ic.com/downloads/CH343SER_ZIP.html)
[Click here to download the Mac driver](http://www.wch-ic.com/downloads/CH34XSER_MAC_ZIP.html)
### Install ESP32 Board Support Package from GitHub

For this board, we recommend you _don't_ use 'release' version of Espressif's board support package because the current release doesn't include board support.

Instead we will install the "very latest" [by following these instructions](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#windows-manual-installation) (scroll down for mac and Linux as well

Basically, install by **git clone** ing the Espressif ESP32 board support to get the very latest version of the code.

In the **Tools → Board** submenu you should see **ESP32 Arduino (in sketchbook)** and in that dropdown it should contain the ESP32 boards along with all the latest ESP32 boards.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/605/medium800/esp32_arduino_ide_setup_image.png?1646944312)

Look for the board called **Adafruit QT Py ESP32-C3** watch out you don't get confused by the other QT Py boards!

![](https://cdn-learn.adafruit.com/assets/assets/000/109/672/medium800/adafruit_products_image.png?1647284793)

![](https://cdn-learn.adafruit.com/assets/assets/000/109/673/medium800/adafruit_products_image.png?1647284952)

The upload speed can be changed: faster speed makes uploads take less time but sometimes can cause upload issues. **921600** should work fine, but if you're having issues, you can drop down lower.

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Arduino NeoPixel Blink

The first and most basic program you can upload to your Arduino is the classic Blink sketch. This takes something on the board and makes it, well, blink! On and off. It's a great way to make sure everything is working and you're uploading your sketch to the right board and right configuration.

When all else fails, you can always come back to Blink!

Now _traditionally_ you would use an onboard LED to make a blink occur. **However, this board does not have an onboard single-color LED** , so we will 'mimic' the same blink sketch but instead of using a digital output pin, we will use NeoPixel support to blink the onboard RGB LED!

![](https://cdn-learn.adafruit.com/assets/assets/000/109/675/medium800/adafruit_products_neopix.jpg?1647285131)

# Pre-Flight Check: Get Arduino IDE & Hardware Set Up

This lesson assumes you have Arduino IDE set up. This is a generalized checklist, some elements may not apply to your hardware. If you haven't yet, check the previous steps in the guide to make sure you:

- **Install the very latest Arduino IDE for Desktop** (not all boards are supported by the Web IDE so we don't recommend it)
- **Install any board support packages (BSP) required for your hardware.** Some boards are built in defaults on the IDE, but lots are not! You may need to install plug-in support which is called the BSP.
- **Get a Data/Sync USB cable for connecting your hardware.** A _significant_ amount of problems folks have stem from not having a USB cable with data pins. Yes, these cursed cables roam the land, making your life hard. If you find a USB cable that doesn't work for data/sync, _throw it away immediately_! There is no need to keep it around, cables are very inexpensive these days.
- **Install any drivers required** - If you have a board with a FTDI or CP210x chip, you may need to get separate drivers. If your board has native USB, it probably doesn't need anything. After installing, reboot to make sure the driver sinks in.
- **Connect the board to your computer.** If your board has a power LED, make sure its lit. Is there a power switch? Make sure its turned On!

The Adafruit QT Py ESP32-C3 has a single NeoPixel on GPIO #2. Unlike some other QT Py boards, there were not enough pins to add a NeoPixel power pin, so the NeoPixel will always be powered.

# Start up Arduino IDE and Select Board/Port

OK, now you are prepared! Open the Arduino IDE on your computer. Now you have to tell the IDE what board you are using, and how you want to connect to it.

In the IDE find the **Tools** menu. You will use this to select the board. If you switch boards, you _must switch the selection!_ So always double-check before you upload code in a new session.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/676/medium800/adafruit_products_port.png?1647285596)

# Install NeoPixel Library

Despite their popularity, NeoPixel RGB LEDs are not supported 'out of the box' in Arduino IDE! You will need to add support by installing the library. Good news it is _very easy_ to do it. Go to the **Library Manager** here

![](https://cdn-learn.adafruit.com/assets/assets/000/107/534/medium800/arduino_neopixel_blink_installlib.png?1640487409)

Search for and install the **Adafruit NeoPixel** library. It might not be first in the list so make sure you get the name matched up right!

![](https://cdn-learn.adafruit.com/assets/assets/000/107/535/medium800/arduino_neopixel_blink_neolib.png?1640487504)

# New NeoPixel Blink Sketch

OK lets make a new blink sketch! From the **File** menu, select **New**

![](https://cdn-learn.adafruit.com/assets/assets/000/107/498/medium800/blink__image.png?1640454932)

Then in the new window, copy and paste this text:

```auto
#include &lt;Adafruit_NeoPixel.h&gt;

// How many internal neopixels do we have? some boards have more than one!
#define NUMPIXELS        1

Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);

// the setup routine runs once when you press reset:
void setup() {
  Serial.begin(115200);

  pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
  pixels.setBrightness(20); // not so bright
}

// the loop routine runs over and over again forever:
void loop() {
  // say hi
  Serial.println("Hello!");
  
  // set color to red
  pixels.fill(0xFF0000);
  pixels.show();
  delay(500); // wait half a second

  // turn off
  pixels.fill(0x000000);
  pixels.show();
  delay(500); // wait half a second
}
```

Info: 

One note you'll see is that we reference the LED with the constant `PIN_NEOPIXEL` rather than a number. That's because each board could have the built in NeoPixels on a different pin and this makes the code a little more portable!

# Verify (Compile) Sketch

OK now you can click the Verify button to convert the sketch into binary data to be uploaded to the board.

Note that Verifying a sketch is the same as Compiling a sketch - so these terms will be used interchangeably.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/533/medium800/arduino_neopixel_blink_compile.png?1640487310)

During verification/compilation, the computer will do a bunch of work to collect all the libraries and code and the results will appear in the bottom window of the IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/500/medium800/blink__image.png?1640455335)

If something went wrong with compilation, you will get red warning/error text in the bottom window letting you know what the error was. It will also highlight the line with an error.

For example, here I had the wrong board selected - and the selected board does not have a built-in NeoPixel pin defined!

![](https://cdn-learn.adafruit.com/assets/assets/000/107/536/medium800/arduino_neopixel_blink_deferr.png?1640487615)

Here's another common error, in my haste I forgot to add a `;` at the end of a line. The compiler warns me that it's looking for one - note that the error is actually a few lines up!

![](https://cdn-learn.adafruit.com/assets/assets/000/107/537/medium800/arduino_neopixel_blink_semi.png?1640487755)

Info: 

On success you will see something like this white text output and the message **Done compiling.** in the message area.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/504/medium800/blink__image.png?1640455995)

# Upload Sketch

Once the code is verified/compiling cleanly you can upload it to your board. Click the **Upload** button:

![](https://cdn-learn.adafruit.com/assets/assets/000/107/538/medium800/arduino_neopixel_blink_upload.png?1640487820)

The IDE will try to compile the sketch again for good measure, then it will try to connect to the board and upload a the file.

**This is actually one of the hardest parts for beginners because it's where a lot of things can go wrong.**

However, start with what it looks like: success! Here's what your board upload process looks like when it goes right:

![](https://cdn-learn.adafruit.com/assets/assets/000/109/677/medium800/adafruit_products_uploadok.png?1647287327)

Often times you will get a warning like this, which is kind of vague:

`No device found on COM66` (or whatever port is selected)  
`An error occurred while uploading the sketch```

![](https://cdn-learn.adafruit.com/assets/assets/000/107/505/medium800/blink__image.png?1640456582)

This could be a few things.

**First up, check again that you have the correct board selected!** Many electronics boards have very similar names or look, and often times folks grab a board different from what they thought.

If you're positive the right board is selected, we recommend the next step is to put the board into manual bootloading mode.

## Native USB and manual bootloading

Historically, microcontroller boards contained two chips: the main micro chip (say, ATmega328 or ESP8266 or ESP32) and a separate chip for USB interface that would be used for bootloading (a CH430, FT232, CP210x, etc). With these older designs, the microcontroller is put into a bootloading state for uploading code by the separate chip. It allows for easier uploading but is more expensive as two chips are needed, and also the microcontroller can't act like a keyboard or disk drive.

Modern chips often have 'native' USB - that means that there is no separate chip for USB interface. It's all in one! Great for cost savings, simplicity of design, reduced size and more control. However, it means the chip must be self-aware enough to be able to put _itself_ into bootload/upload mode on its own. That's fine 99% of the time but is very likely you will at some point get the board into an odd state that makes it too confused to bootload.

Warning: 

Before continuing we _really really_ suggest turning on **Verbose Upload** messages, it will help in this process because you will be able to see what the IDE is trying to do. It's a checkbox in the **Preferences** menu.

![](https://cdn-learn.adafruit.com/assets/assets/000/107/507/medium800/blink__image.png?1640457254)

## Enter Manual Bootload Mode

OK now you know it's probably time to try manual bootloading. No problem! Here is how you do that for this board:

1. Have the QT Py C3 plugged in
2. Press and **hold** down the BOOT button
3. Press and release the RESET button (while the BOOT button is held down)

Once you are in manual bootload mode, go to the Tools menu, and make sure you have selected the bootloader serial port. **It is almost certain that the serial port has changed now that the bootloader is enabled.**

![](https://cdn-learn.adafruit.com/assets/assets/000/109/678/medium800/adafruit_products_dev_module.png?1647287489)

Now you can try uploading again!

![](https://cdn-learn.adafruit.com/assets/assets/000/107/506/medium800/blink__image.png?1640457185)

Info: 

This time, you should have success!

After uploading this way, be sure to **click the reset button** - it sort of makes sure that the board got a good reset and will come back to life nicely.

Warning: 

It's also a good idea to try to re-upload the sketch again now that you've performed a manual bootload to get the chip into a good state. It should perform an auto-reset the second time, so you don't have to manually bootload again.

Info: 

# Finally, a Blink!

OK it was a journey but now we're here and you can enjoy your blinking LED. Next up, try to change the delay between blinks and re-upload. It's a good way to make sure your upload process is smooth and practiced.

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Arduino I2C Scan

A lot of sensors, displays, and devices can connect over I2C. I2C is a 2-wire 'bus' that allows multiple devices to all connect on one set of pins so it's very convenient for wiring!

When using your board, you'll probably want to connect up I2C devices, and it can be a little tricky the first time. The best way to debug I2C is go through a checklist and then perform an I2C scan

# Common I2C Connectivity Issues

- **Have you connected four wires (at a minimum) for each I2C device?** Power the device with whatever is the logic level of your microcontroller board (probably 3.3V), then a ground wire, and a SCL clock wire, and and a SDA data wire.
- **If you're using a STEMMA QT board - check if the power LED is lit.** It's usually a green LED to the left side of the board.
- **Does the STEMMA QT/I2C port have switchable power or pullups?** To reduce power, some boards have the ability to cut power to I2C devices or the pullup resistors. Check the documentation if you have to do something special to turn on the power or pullups.
- **If you are using a DIY I2C device, do you have pullup resistors?** Many boards do _not_ have pullup resistors built in and they are _required!_ We suggest any common 2.2K to 10K resistors. You'll need two: one each connects from SDA to positive power, and SCL to positive power. Again, positive power (a.k.a VCC, VDD or V+) is often 3.3V
- **Do you have an address collision?** You can only have _one_ board per address. So you cannot, say, connect two AHT20's to one I2C port because they have the same address and will interfere. Check the sensor or documentation for the address. Sometimes there are ways to adjust the address.
- **Does your board have multiple I2C ports?** Historically, boards only came with one. But nowadays you can have two or even three! This can help solve the "hey, but what if I want two devices with the same address" problem: just put one on each bus.
- **Are you hot-plugging devices?** I2C does _not_ support dynamic re-connection, you cannot connect and disconnect sensors as you please. They should all be connected on boot and not change. ([Only exception is if you're using a hot-plug assistant but that'll cost you](https://www.adafruit.com/product/5159)).
- **Are you keeping the total bus length reasonable?** I2C was designed for maybe 6" max length. We like to push that with plug-n-play cables, but really please keep them as short as possible! ([Only exception is if you're using an active bus extender](https://www.adafruit.com/product/4756)).

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/109/683/medium800/adafruit_products_image.png?1647309489)

![](https://cdn-learn.adafruit.com/assets/assets/000/109/683/medium800/adafruit_products_image.png?1647309489)

![](https://cdn-learn.adafruit.com/assets/assets/000/109/683/medium800/adafruit_products_image.png?1647309489)

# Perform an I2C scan!

### Install TestBed Library

To scan I2C, the Adafruit TestBed library is used. This library and example just makes the scan a little easier to run because it takes care of some of the basics. You will need to add support by installing the library. Good news: it is _very easy_ to do it. Go to the **Arduino Library Manager.**

![](https://cdn-learn.adafruit.com/assets/assets/000/107/555/medium800/i2c_scan_test_installlib.png?1640562425)

Search for **TestBed** and install the **Adafruit TestBed** library

![](https://cdn-learn.adafruit.com/assets/assets/000/107/556/medium800/i2c_scan_test_testbedlib.png?1640562581)

Now open up the I2C Scan example

![](https://cdn-learn.adafruit.com/assets/assets/000/107/557/medium800/i2c_scan_test_i2cscan.png?1640562632)

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/I2C_Scanners/arduino/i2c_scanner/i2c_scanner.ino

### Wire up I2C device

While the examples here will be using the [Adafruit MCP9808](https://www.adafruit.com/product/5027), a high accuracy temperature sensor, the overall process is the same for just about any I2C sensor or device.

The first thing you'll want to do is get the sensor connected so your board has I2C to talk to.

### Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout

[Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout](https://www.adafruit.com/product/5027)
The MCP9808 digital temperature sensor is one of the more accurate/precise we've ever seen, with a typical accuracy of ±0.25°C over the sensor's -40°C to +125°C range and precision of +0.0625°C. They work great with any microcontroller using standard I2C. With...

In Stock
[Buy Now](https://www.adafruit.com/product/5027)
[Related Guides to the Product](https://learn.adafruit.com/products/5027/guides)
![Top view of temperature sensor breakout above an OLED display FeatherWing. The OLED display reads "MCP9808 Temp: 24.19ºC"](https://cdn-shop.adafruit.com/640x480/5027-04.jpg)

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
![Angled of of JST SH 4-Pin Cable.](https://cdn-shop.adafruit.com/640x480/4399-00.jpg)

## Wiring the MCP9808

The MCP9808 comes with a STEMMA QT connector, which makes wiring it up quite simple and solder-free.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/679/medium800/adafruit_products_qtmcp.png?1647287670)

Now upload the scanning sketch to your microcontroller and open the serial port to see the output. You should see something like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/109/682/medium800/adafruit_products_image.png?1647309489)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## WiFi Test

Thanksfully if you have ESP32 sketches, they'll 'just work' with variations of ESP32. You can find a wide range of examples in the **File-\>Examples-\>Examples for Adafruit Metro ESP32-S2** subheading (the name of the board may vary so it could be **"Examples for Adafruit Feather ESP32 V2"** etc)

![](https://cdn-learn.adafruit.com/assets/assets/000/097/028/medium800/adafruit_products_image.png?1605222761)

Let's start by scanning the local networks.

**Load up the WiFiScan example** under **Examples-\>Examples for YOUR BOARDNAME-\>WiFi-\>WiFiScan**

![](https://cdn-learn.adafruit.com/assets/assets/000/096/993/medium800/adafruit_products_Screen_Shot_2020-11-11_at_12.28.51_PM.png?1605115789)

And **upload this example to your board**. The ESP32 should scan and find WiFi networks around you.

For ESP32, open the serial monitor, to see the scan begin.

For ESP32-S2, -S3 and -C3, don't forget you have to click Reset after uploading through the ROM bootloader. Then select the new USB Serial port created by the ESP32. It will take a few seconds for the board to complete the scan.

![](https://cdn-learn.adafruit.com/assets/assets/000/097/029/medium800/adafruit_products_image.png?1605223012)

If you can not scan any networks, check your power supply. You need a solid power supply in order for the ESP32 to not brown out. A skinny USB cable or drained battery can cause issues.

## WiFi Connection Test

Now that you can scan networks around you, its time to connect to the Internet!

Copy the example below and paste it into the Arduino IDE:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/ESP32_S2_WiFi_Tests/WiFiWebClient/WiFiWebClient.ino

 **NOTE:** You must **change the `SECRET_SSID` and `SECRET_PASS` in the example code to your WiFi SSID and password** before uploading this to your board.

![](https://cdn-learn.adafruit.com/assets/assets/000/097/030/medium800/adafruit_products_image.png?1605223125)

After you've set it correctly, upload and check the serial monitor. You should see the following. If not, go back, check wiring, power and your SSID/password

![](https://cdn-learn.adafruit.com/assets/assets/000/097/009/medium800/adafruit_products__dev_cu_usbmodem14101.png?1605127946)

## Secure Connection Example

Many servers today do not allow non-SSL connectivity. Lucky for you the ESP32 has a great TLS/SSL stack so you can have that all taken care of for you. Here's an example of a using a secure WiFi connection to connect to the Twitter API.

Copy and paste it into the Arduino IDE:

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/ESP32_S2_WiFi_Tests/WiFiSSLClient/WiFiSSLClient.ino

As before, **update the ssid and password first** , then upload the example to your board.

Note we use `WiFiClientSecure client` instead of `WiFiClient client;` to require a SSL connection!&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/097/010/medium800/adafruit_products__dev_cu_usbmodem14101.png?1605128497)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## WipperSnapper Setup

Warning: 

## What is WipperSnapper

WipperSnapper is a firmware designed to turn any WiFi-capable board into an Internet-of-Things device without programming a single line of code. WipperSnapper connects to [Adafruit IO](https://io.adafruit.com/), a web&nbsp;platform designed ([by Adafruit!](https://www.adafruit.com/about)) to&nbsp;_display_,&nbsp;_respond_, and&nbsp;_interact_&nbsp;with your project's data.

Simply load the WipperSnapper firmware onto your board, add credentials, and plug it into power. Your board will automatically register itself with your Adafruit IO account.

From there, you can add&nbsp;_components_&nbsp;to your board such as buttons, switches, potentiometers, sensors, and more! Components are&nbsp;_dynamically&nbsp;_added to hardware, so you can&nbsp;immediately start interacting, logging, and streaming the data your projects produce without writing code.

## Sign up for Adafruit.io

You will need an Adafruit IO account to use WipperSnapper on your board. If you do not already have one, head over to [io.adafruit.com](https://io.adafruit.com/) to create a&nbsp;_free_ account.

### Install CP2104 / CP2102N USB Driver

Many ESP32 boards have a USB-to-Serial converter that talks to the chip itself, and will need a driver on your computer's operating system. The driver is available for Mac, Windows and Linux.

[Click here to download the CP2104 USB Driver](http://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
### Install CH9102 / CH34X USB Driver

Newer ESP32 boards have a different USB-to-serial converter that talks to the chip itself, and will need a driver on your computer's operating system. The driver is available for Mac and Windows. It is already built into Linux.

If you would like more detail, check out&nbsp;[the guide on installing these drivers](https://learn.adafruit.com/how-to-install-drivers-for-wch-usb-to-serial-chips).

[Click here to download the Windows driver](http://www.wch-ic.com/downloads/CH341SER_ZIP.html)
[Click here to download the Mac driver](http://www.wch-ic.com/downloads/CH34XSER_MAC_ZIP.html)
## Add a New Device to Adafruit IO

Log into your [Adafruit IO](https://io.adafruit.com/) account. Click the _New Device_ button at the top of the page.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/548/medium800/wippersnapper_setup__board_selector__web__new_device_1.png?1655919766)

After clicking New Device, you should be on the _board selector_ page. This page displays every board that is compatible with the WipperSnapper firmware.

![](https://cdn-learn.adafruit.com/assets/assets/000/112/550/medium800/wippersnapper_setup__board_selector__web__selector_maion.png?1655920178)

In the board selector page's search bar, search for the&nbsp; **QT Py ESP32-C3** _.&nbsp;_Once you've located the board you'd like to install WipperSnapper on,_&nbsp;_click the&nbsp;_Choose Board_&nbsp;button to bring you to the self-guided installation wizard.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/087/medium800/adafruit_products_IO_-_New_Device.png?1677700902)

Follow the step-by-step instructions on the page to install Wippersnapper on your device and connect it to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/120/543/medium800/adafruit_products_qtpy_c3_ss.png?1682710654)

If the installation was successful, a popover should appear displaying that your board has successfully been detected by Adafruit IO.

Give your board a name and click "Continue to Device Page".

![](https://cdn-learn.adafruit.com/assets/assets/000/119/089/medium800/adafruit_products_IO_-_Devices.png?1677701038)

You should be brought to your board's device page.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/090/medium800/adafruit_products_IO_-_Device__Adafruit_QT_Py_ESP32-C3.png?1677701053)

## Feedback

Adafruit.io WipperSnapper is in **beta** and you can help improve it!

If you have&nbsp; suggestions or general feedback about the installation process - visit [https://io.adafruit.com/support](https://io.adafruit.com/support), click _"Contact Adafruit IO Support"_ and select _"I have feedback or suggestions for the WipperSnapper Beta"._

## Troubleshooting

If you encountered an issue during installation, please try the steps below first.

If you're still unable to resolve the issue, or if your issue is not listed below, get in touch with us directly at [https://io.adafruit.com/support](https://io.adafruit.com/support "https://io.adafruit.com/support"). Make sure to click&nbsp; _"Contact Adafruit IO Support"_ and select "_There is an issue with WipperSnapper. Something is broken!"_

### 

First, make sure that you selected the correct board on the board selector.

Next, please make sure that you entered your WiFi credentials properly, there are no spaces/special characters in either your network name (SSID) or password, and that you are connected to a 2.4GHz wireless network.

If you're still unable to connect your board to WiFi, please [make a new post on the WipperSnapper technical support forum with the error you're experiencing, the LED colors which are blinking, and the board you're using.](https://forums.adafruit.com/viewforum.php?f=66)

### 

Try hard-resetting your board by unplugging it from USB power and plugging it back in.

If the error is still occurring, please&nbsp;[make a new post on the WipperSnapper technical support forum with information about what you're experiencing, the LED colors which are blinking (if applicable), and the board you're using.](https://forums.adafruit.com/viewforum.php?f=66)

## "Uninstalling" WipperSnapper&nbsp;

WipperSnapper firmware is an application that is loaded onto your board. There is nothing to "uninstall". However, you may want to "move" your board from running WipperSnapper to running Arduino or CircuitPython. You also may need to restore your board to the state it was shipped to you from the Adafruit factory.&nbsp;

### Moving from WipperSnapper to CircuitPython

Follow the steps on the [Installing CircuitPython page](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython) to install CircuitPython on your board running WipperSnapper.

- If you are unable to double-tap the RST button to enter the UF2 bootloader, follow the _"Factory Resetting a WipperSnapper Board"_ instructions below.

Uploading this sketch will overwrite WipperSnapper. If you want to re-install WipperSnapper, follow the instructions at the top of this page.

### Moving from WipperSnapper to Arduino

If you want to use your board with Arduino, you will use the Arduino IDE to load&nbsp;_any_ sketch onto your board.

First, follow the page below to set up your Arduino IDE environment for use with your board.

Then, follow the page below to upload the "Arduino Blink" sketch to your board.

Uploading this sketch will overwrite WipperSnapper. If you want to re-install WipperSnapper, follow the instructions at the top of this page.

### Factory Resetting a WipperSnapper Board

Sometimes, hardware gets into a state that requires it to be "restored" to the original state it shipped in. If you'd like to get your board back to its original factory state, follow the guide below.

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## WipperSnapper Essentials

![](https://cdn-learn.adafruit.com/assets/assets/000/143/640/medium800/wippersnapper_essentials_heading__required_parts__adafruit_20boards_wippersnapper_io-2.jpg?1775751347)

You've installed WipperSnapper firmware on your board and connected it to Adafruit IO. Next, let's learn how to use Adafruit IO!

The Adafruit IO supports a large number of _components. Components_ are physical parts such as buttons, switches, sensors, servos, LEDs, RGB LEDs, and more.&nbsp;

The following pages will get you up and running with WipperSnapper as you interact with your board's LED, read the value of a push button, send the value of an I2C sensor to the internet, and wirelessly control colorful LEDs.

### Parts

The following parts are&nbsp; **required** to complete the WipperSnapper essentials pages for this board:

### STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear

[STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear](https://www.adafruit.com/product/4493)
For the easiest way possible to measure twists, turn to this STEMMA potentiometer breakout (ha!). This plug-n-play pot comes with a JST-PH 2mm connector and a matching &nbsp;[JST PH 3-Pin to Male Header Cables - 200mm](https://www.adafruit.com/product/3893), so wiring up is a cinch....

Out of Stock
[Buy Now](https://www.adafruit.com/product/4493)
[Related Guides to the Product](https://learn.adafruit.com/products/4493/guides)
![Video of a white hand turning the knob on a STEMMA Wired Potentiometer Breakout Board connect to a breadboard. Color changes when the knob is twisted. ](https://cdn-shop.adafruit.com/product-videos/640x480/4493-04.jpg)

### Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout

[Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout](https://www.adafruit.com/product/5027)
The MCP9808 digital temperature sensor is one of the more accurate/precise we've ever seen, with a typical accuracy of ±0.25°C over the sensor's -40°C to +125°C range and precision of +0.0625°C. They work great with any microcontroller using standard I2C. With...

In Stock
[Buy Now](https://www.adafruit.com/product/5027)
[Related Guides to the Product](https://learn.adafruit.com/products/5027/guides)
![Top view of temperature sensor breakout above an OLED display FeatherWing. The OLED display reads "MCP9808 Temp: 24.19ºC"](https://cdn-shop.adafruit.com/640x480/5027-04.jpg)

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
![Angled of of JST SH 4-Pin Cable.](https://cdn-shop.adafruit.com/640x480/4399-00.jpg)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## NeoPixel LED

Your board has a WS281x RGB LED (NeoPixel, in Adafruit jargon) built in. Boards running the WipperSnapper firmware can be wirelessly controlled by Adafruit IO to interact with NeoPixels.

On this page, you'll learn how to change the color and brightness of the NeoPixel built into your board from Adafruit IO.

## Where is the NeoPixel on my board?
- Above the SCK and MI on the silk, is the&nbsp; **RGB NeoPixel LED** outlined in black.&nbsp;

![adafruit_products_QTP_NeoPixel.jpg](https://cdn-learn.adafruit.com/assets/assets/000/119/084/medium640/adafruit_products_QTP_NeoPixel.jpg?1677700508)

## Create the NeoPixel Component
Primary: If you used the Magic Config button to automatically configure the components on your board, then the NeoPixel component will already be configured. Skip ahead to the **Usage** section.

Don't know about Magic Config? Click the Auto-Config button on the device page for further details!

On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/091/medium800/adafruit_products_qtpyc3-new-component.png?1677701082)

Search for the component name by entering&nbsp;`neopixel`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing

![neopixel_led__built_in__NaP8Tyf3AP.png](https://cdn-learn.adafruit.com/assets/assets/000/127/434/medium640/neopixel_led__built_in__NaP8Tyf3AP.png?1706807288)

### Filtering and searching for components

Since WipperSnapper supports such a large number of components, you can use keyword filtering. Try searching for various keywords, like:

- component names:&nbsp;`aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`, `neopixel`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

There is also added product and documentation links for every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide

Select the **NeoPixel** &nbsp;from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

![neopixel_led__built_in__NaP8Tyf3AP.png](https://cdn-learn.adafruit.com/assets/assets/000/127/447/medium640/neopixel_led__built_in__NaP8Tyf3AP.png?1706818377)

The board NeoPixel pin is automatically found and selected.

Click&nbsp; **Create Component**

![](https://cdn-learn.adafruit.com/assets/assets/000/119/092/medium800/adafruit_products_IO_-_Device__Adafruit_QT_Py_ESP32-C3.png?1677701102)

Behind the scenes, Adafruit IO sends a command to your board running WipperSnapper firmware telling it to configure the pin as a NeoPixel component with the settings from the form.

The Device page shows the NeoPixel component.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/093/medium800/adafruit_products_IO_-_Device__Adafruit_QT_Py_ESP32-C3.png?1677701118)

## Set the NeoPixel's RGB Color

Since no colors have been set yet, the color picker's default value is `#000000` (black in hex color code) and appears "off". You can change that to make the NeoPixel shine brightly!&nbsp;

On the NeoPixel component, click the color dropper at the end of the color swatch list.

![](https://cdn-learn.adafruit.com/assets/assets/000/127/438/medium800/neopixel_led__built_in__gU5CxAW05e_ARROW.png?1706808192)

A color picker pops open! Next: learning how Adafruit IO uses hex color codes to represent the colors on your NeoPixel.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/313/medium800/neopixel_led__built_in__picker-no-color-set.png?1675876687)

### Hex Colors 101

The color picker on Adafruit IO uses hex color codes to represent Red, Green, and Blue values. For example, `#FF0000` is the hex color code for the color red. The colors (`#FF0000`) red component is `FF` (255 translated to decimal), the green component is `00` and the blue component is `00`. Translated to RGB format, the color is `RGB (255, 0, 0)`.&nbsp;

Using the color picker, or by manually entering a hex color code, select a color.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/677/medium800thumb/neopixel_led_ezgif.com-gif-maker_%283%29.jpg?1674668859)

When you're ready to set the color of your device's NeoPixel, click **FILL WITH COLOR**.&nbsp;The NeoPixel will immediately glow!

![](https://cdn-learn.adafruit.com/assets/assets/000/119/086/medium800thumb/adafruit_products_ezgif.com-video-to-gif_%2831%29.jpg?1677700599)

## Set NeoPixel Brightness

If the NeoPixel is too bright (or too dim), you can change the overall brightness. Click the gear/cog icon on the NeoPixel component to open its settings.

![](https://cdn-learn.adafruit.com/assets/assets/000/127/439/medium800/neopixel_led__built_in__arrow_FTzWrYk8MV.png?1706810370)

On the NeoPixel component form, set Brightness to a value between 0 (fully off) and 255 (full brightness).

Click the **Update Component&nbsp;** button to send the updated configuration to your device.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/117/675/medium800/neopixel_led_IO_-_Device__Adafruit_Feather_ESP32_V2.png?1674666662)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Read a Push-button

Info: This demo shows reading the state of a push-button from WipperSnapper. But the same kind of control can be used for reading switches, break beam sensors, and other digital sensors.

You can configure a board running WipperSnapper to read data from standard input buttons, switches, or digital sensors, and send the value to Adafruit IO.

From Adafruit IO, you will configure one of the pushbuttons on your board as a push button component. Then, when the button is pressed (or released), a value will be published to Adafruit IO.

## Button Location

This example uses the board's built-in push-button and internal pull-up resistor instead of wiring a push-button up.

The **BOOT** button on the QT Py ESP32 Pico is located underneath the USB-C port.

![adafruit_products_qtpy-esp32-boot-btn.png](https://cdn-learn.adafruit.com/assets/assets/000/119/094/medium640/adafruit_products_qtpy-esp32-boot-btn.png?1677701169)

## Create a Push-button Component on Adafruit IO
On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/095/medium800/adafruit_products_qtpyc3-new-component.png?1677701273)

Search for the component name by entering&nbsp;`push`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing.

![read_a_push_button__built_in__5NrzQhD0zT.png](https://cdn-learn.adafruit.com/assets/assets/000/127/430/medium640/read_a_push_button__built_in__5NrzQhD0zT.png?1706749773)

### Filtering and searching for components

Since WipperSnapper supports such a large number of components, you can use filtering. Try searching for various keywords, like:

- component names:` aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`,&nbsp;`potentiometer`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

There are also added product and documentation links for every component. Follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide.

Select the **Push Button** &nbsp;from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

![read_a_push_button__built_in__5NrzQhD0zT.png](https://cdn-learn.adafruit.com/assets/assets/000/127/431/medium640/read_a_push_button__built_in__5NrzQhD0zT.png?1706749847)

The "Create Push Button Component" form&nbsp;presents you with options for configuring the push button.

Start by selecting the board's pin connected to the push button.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/096/medium800/adafruit_products_qtpy-esp32-pb-1.png?1677701299)

The&nbsp;_Return Interval_&nbsp;dictates how frequently the value of the push-button will be sent from the board to Adafruit IO.

For this example, you will configure the push button's value to be only sent when the value changes (i.e. when it's either pressed or depressed).

![](https://cdn-learn.adafruit.com/assets/assets/000/119/097/medium800/adafruit_products_qtpy-esp32-pb-2.png?1677701310)

Finally, check the&nbsp; **Specify Pin Pull Direction&nbsp;** checkbox and select the pull direction.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/098/medium800/adafruit_products_qtpy-esp32-pb-3.png?1677701334)

Make sure the form's settings look like the following screenshot. Then, click&nbsp; **Create Component**.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/099/medium800/adafruit_products_qtpy-esp32-pb-4.png?1677701345)

Adafruit IO sends a command to your WipperSnapper board, telling it to configure the GPIO pin you selected to behave as a digital input pin and to enable it to pull up the internal resistor.

Your board's page should also show the new push-button component.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/100/medium800/adafruit_products_IO_-_Device__Adafruit_QT_Py_ESP32-C3.png?1677701372)

Push the button on your board to change the value of the push-button component on Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/101/medium800thumb/adafruit_products_ezgif.com-video-to-gif_%2832%29.jpg?1677701388)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Analog Input

Your microcontroller board has both digital and analog signal capabilities. Some pins are analog, some are digital, and some are capable of both. Check the **Pinouts** page in this guide for details about your board.

Analog signals are different from digital signals in that they can be _any_ voltage and can vary continuously and smoothly between voltages. An analog signal is like a dimmer switch on a light, whereas a digital signal is like a simple on/off switch.&nbsp;

Digital signals only can ever have two states, they are either are **on** (high logic level voltage like 3.3V) or **off** (low logic level voltage like 0V / ground).

By contrast, analog signals can be any voltage in-between on and off, such as 1.8V or 0.001V or 2.98V and so on.

![](https://cdn-learn.adafruit.com/assets/assets/000/102/411/medium800/analog_in_Analog_Template_analog.jpg?1622144011)

Analog signals are continuous values which means they can be an _infinite_ number of different voltages. Think of analog signals like a floating point or fractional number, they can smoothly transiting to _any_ in-between value like 1.8V, 1.81V, 1.801V, 1.8001V, 1.80001V and so forth to infinity.

Many devices use analog signals, in particular sensors typically output an analog signal or voltage that varies based on something being sensed like light, heat, humidity, etc.

## Analog to Digital Converter (ADC)

An analog-to-digital-converter, or ADC, is the key to reading analog signals and voltages with a microcontroller. An ADC is a device that reads the voltage of an analog signal and converts it into a digital, or numeric, value. The microcontroller can’t read analog signals directly, so the analog signal is first converted into a numeric value by the ADC.&nbsp;

The black line below shows a digital signal over time, and the red line shows the converted analog signal over the same amount of time.

![](https://cdn-learn.adafruit.com/assets/assets/000/102/412/medium800/analog_in_Analog_Template_ADC.jpg?1622144080)

Once that analog signal has been converted by the ADC, the microcontroller can use those digital values any way you like!

## Potentiometers

A potentiometer is a small variable resistor that you can twist a knob or shaft to change its resistance. It has three pins. By twisting the knob on the potentiometer you can change the resistance of the middle pin (called the wiper) to be anywhere within the range of resistance of the potentiometer.

By wiring the potentiometer to your board in a special way (called a voltage divider) you can turn the change in resistance into a change in voltage that your board’s analog to digital converter can read.

![](https://cdn-learn.adafruit.com/assets/assets/000/102/413/medium800/analog_in_Analog_Template_potentiometer.jpg?1622144123)

To wire up a potentiometer as a voltage divider:

- Connect **one outside pin** to **ground**
- Connect **the other outside pin** to **voltage in (e.g. 3.3V)**
- Connect **the middle pin** to **an analog pin (e.g. A0)**

![analog_in_Analog_template_pot_voltage_divider.jpg](https://cdn-learn.adafruit.com/assets/assets/000/102/481/medium640/analog_in_Analog_template_pot_voltage_divider.jpg?1622481955)

## Hardware

In addition to your microcontroller board, you will need the following hardware to follow along with this example.

 **Potentiometer**

### STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear

[STEMMA Wired Potentiometer Breakout Board - 10K ohm Linear](https://www.adafruit.com/product/4493)
For the easiest way possible to measure twists, turn to this STEMMA potentiometer breakout (ha!). This plug-n-play pot comes with a JST-PH 2mm connector and a matching &nbsp;[JST PH 3-Pin to Male Header Cables - 200mm](https://www.adafruit.com/product/3893), so wiring up is a cinch....

Out of Stock
[Buy Now](https://www.adafruit.com/product/4493)
[Related Guides to the Product](https://learn.adafruit.com/products/4493/guides)
![Video of a white hand turning the knob on a STEMMA Wired Potentiometer Breakout Board connect to a breadboard. Color changes when the knob is twisted. ](https://cdn-shop.adafruit.com/product-videos/640x480/4493-04.jpg)

## Wire Up the Potentiometer

Connect the potentiometer to your board as follows.

- **QT Py 3V&nbsp;** to **&nbsp;potentiometer left pin**
- **QT Py A2&nbsp;** to **&nbsp;potentiometer middle pin**
- **QT Py GND&nbsp;** to **&nbsp;potentiometer right pin**

**Note:** &nbsp;On WipperSnapper, the ESP32's ADC1 pins are unusable for analog input since WiFi is constantly running.&nbsp;

- [For information on what Analog Input pins can (and can't) be used on this board, click here \>\>\>](https://learn.adafruit.com/adafruit-huzzah32-esp32-feather/esp32-faq#faq-2991123)

![adafruit_products_qtpy-pico-pot.png](https://cdn-learn.adafruit.com/assets/assets/000/119/102/medium640/adafruit_products_qtpy-pico-pot.png?1677701440)

## Create a Potentiometer Component on Adafruit IO

On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/103/medium800/adafruit_products_qtpyc3-new-component.png?1677701458)

Search for the component name by entering `potentiometer`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing.

![analog_in__pot___N0AyUqauwx.png](https://cdn-learn.adafruit.com/assets/assets/000/128/616/medium640/analog_in__pot___N0AyUqauwx.png?1709746646)

### Filtering and searching for components

Since WipperSnapper supports such a large number of components, there is keyword filtering. Try searching for various keywords, like:

- component names: `aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`,&nbsp;`potentiometer`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

There are also added product and documentation links for every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide.

Select the&nbsp; **Potentiometer** &nbsp;from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

![analog_in__pot___N0AyUqauwx.png](https://cdn-learn.adafruit.com/assets/assets/000/128/617/medium640/analog_in__pot___N0AyUqauwx.png?1709746737)

On the _Create Potentiometer Component_ form:

- Set&nbsp; **Potentiometer Pin** &nbsp;to&nbsp; **A2**

- Select **"On Change"** as the **Return Interval**
- Select **Raw Analog Value** as the **Return Type**

Then, click Create Component

![](https://cdn-learn.adafruit.com/assets/assets/000/128/717/medium800/adafruit_products_wireless_analog_in__pot___pot-pin-form.png?1710514654)

The potentiometer component appears on your board page! Next, learning to read values from it.

## Read Analog Pin Values

Rotate the potentiometer to see the value change.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/240/medium800thumb/analog_in__pot___ezgif.com-video-to-gif.jpg?1675792293)

_What do these values mean?_

WipperSnapper reports ADC "raw values" as 16-bit unsigned integer values. Your potentiometer will read between 0 (twisting the pot to the leftmost position) and 65535 (twisting the pot to the rightmost position).&nbsp;

## Read Analog Pin Voltage Values

You can update the potentiometer component (or any analog pin component in WipperSnapper) to report values in Volts. To do this, on the right-hand side of the potentiometer component, click the cog button.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/241/medium800/analog_in__pot___cog-click.png?1675792568)

Under **Return Type** , click Voltage.

Click Update Component to send the updated component settings to your board running WipperSnapper.

![](https://cdn-learn.adafruit.com/assets/assets/000/118/242/medium800/analog_in__pot___voltage-select.png?1675792603)

Now, twist the potentiometer to see the value reported to Adafruit IO in Volts!

![](https://cdn-learn.adafruit.com/assets/assets/000/118/243/medium800thumb/analog_in__pot___ezgif.com-video-to-gif_%281%29.jpg?1675792716)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## I2C Sensors

Info: 

Inter-Integrated Circuit, aka **I2C** , is a two-wire protocol for connecting sensors and "devices" to a microcontroller. A large number of sensors, including the ones sold by Adafruit, use I2C to communicate.&nbsp;

**Typically, using I2C with a microcontroller involves programming. Adafruit IO and WipperSnapper let you configure a microcontroller to read data from an I2C sensor and publish that data to the internet without writing code.**

The WipperSnapper firmware supports a number of I2C sensors,&nbsp;[viewable in list format here](https://github.com/adafruit/Wippersnapper_Components/tree/main/components/i2c).

- If you do not see the I2C sensor you're attempting to use with WipperSnapper,&nbsp;[Adafruit has a guide on adding a component to Adafruit IO WipperSnapper here](https://learn.adafruit.com/how-to-add-a-new-component-to-adafruit-io-wippersnapper).&nbsp;

On this page, you'll learn how to wire up an I2C sensor to your board. Then, you'll create a new component on Adafruit IO for your I2C sensor and send the sensor values to Adafruit IO. Finally, you'll learn how to locate, interpret, and download the data produced by your sensors.

## Parts

You will need the following parts to complete this page:

### Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout

[Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout](https://www.adafruit.com/product/5027)
The MCP9808 digital temperature sensor is one of the more accurate/precise we've ever seen, with a typical accuracy of ±0.25°C over the sensor's -40°C to +125°C range and precision of +0.0625°C. They work great with any microcontroller using standard I2C. With...

In Stock
[Buy Now](https://www.adafruit.com/product/5027)
[Related Guides to the Product](https://learn.adafruit.com/products/5027/guides)
![Top view of temperature sensor breakout above an OLED display FeatherWing. The OLED display reads "MCP9808 Temp: 24.19ºC"](https://cdn-shop.adafruit.com/640x480/5027-04.jpg)

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
![Angled of of JST SH 4-Pin Cable.](https://cdn-shop.adafruit.com/640x480/4399-00.jpg)

## Wiring
Connect the&nbsp; **QT Py's STEMMA QT Port** &nbsp;to&nbsp; **MCP9808's STEMMA QT Port**

- **NOTE** : At the time of writing, **&nbsp;the QT Py's second I2C port&nbsp;** (mapped to the SCL/SDA pins on the board) **&nbsp;is not supported by WipperSnapper.&nbsp;** Only the STEMMA I2C port is supported.

![adafruit_products_qtpy-mcp_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/119/104/medium640/adafruit_products_qtpy-mcp_bb.png?1677701704)

## Add an MCP9808 Component

On the device page, click the New Component (or "+") button to open the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/105/medium800/adafruit_products_qtpyc3-new-component.png?1677701711)

Search for the component name by entering `MCP9808`&nbsp;into the text box on the component picker, the list of components should update as soon as you stop typing.

![i2c__external__ARROW_YHKeButdWT.png](https://cdn-learn.adafruit.com/assets/assets/000/127/456/medium640/i2c__external__ARROW_YHKeButdWT.png?1706830517)

### Filtering and searching for components

Since WipperSnapper supports such a large number of components, there is keyword filtering. Try searching for various keywords, like:

- component names:&nbsp;`aht20`,&nbsp;`servo`,&nbsp;`buzzer`,&nbsp;`button`,&nbsp;`potentiometer`, etc
- sensor types:&nbsp;`light`,&nbsp;`temperature`,&nbsp;`pressure`,&nbsp;`humidity`, etc
- interface:&nbsp;`i2c`,&nbsp;`uart`,&nbsp;`ds18x20`,&nbsp;`pin`, etc (also I2C addresses e.g.&nbsp;`0x44`)
- vendor:&nbsp;`Adafruit`,&nbsp;`ASAIR`,&nbsp;`Infineon`,&nbsp;`Bosch`,&nbsp;`Honeywell`,&nbsp;`Sensirion`, etc

There are added product and documentation links for every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn Guide.

Select the&nbsp; **MCP9808** &nbsp;from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

![i2c__external__ARROW_YHKeButdWT.png](https://cdn-learn.adafruit.com/assets/assets/000/127/457/medium640/i2c__external__ARROW_YHKeButdWT.png?1706830625)

On the component configuration page, the MCP9808's I2C sensor address should be listed along with the sensor's settings.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/981/medium800/i2c__external__mcp9808-form.png?1675199307)

The MCP9808 sensor can measure ambient temperature. This page has individual options for reading the ambient temperature, in either Celsius or Fahrenheit. You may select the readings which are appropriate to your application and region.

The&nbsp; **Send Every** &nbsp;option is specific to each sensor measurement. This option will tell the board how often it should read from the sensor and send the data to Adafruit IO. Measurements can range from every 30 seconds to every 24 hours.

For this example, set the&nbsp; **Send Every&nbsp;** interval for both seconds to&nbsp; **Every 30 seconds.&nbsp;** Click&nbsp; **Create Component**.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/982/medium800/i2c__external__mcp9808-form-2.png?1675199314)

The board page should now show the MCP9808 component you created. After the interval you configured elapses, the WipperSnapper firmware running on your board automatically reads values from the sensor and sends them to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/119/106/medium800/adafruit_products_mcp9808.png?1677701871)

## Read I2C Sensor Values

Now to look behind the scenes at a powerful element of using Adafruit IO and WipperSnapper. When a new component is created on Adafruit IO, an&nbsp;[Adafruit IO Feed](https://learn.adafruit.com/adafruit-io-basics-feeds)&nbsp;is also created. This Feed holds your sensor component values for long-term storage (30 days of storage for Adafruit IO Free and 60 days for Adafruit IO Plus plans).

Aside from holding the&nbsp; **values** &nbsp;read by a sensor, the component's feed also holds&nbsp; **metadata** &nbsp;about the data pushed to Adafruit IO. This includes settings for whether the data is public or private, what license the stored sensor data falls under, and a general description of the data.

Next, to look at the sensor temperature feed. To navigate to a component's feed, click on the chart icon in the upper-right-hand corner of the component.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/984/medium800/i2c__external__chart-icon.png?1675199374)

On the component's feed page, you'll each data point read by your sensor and when they were reported to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/117/985/medium800/i2c__external__mcpx-feed.png?1675199406)

### Doing more with your sensor's Adafruit IO Feed

This only scratches the surface of what Adafruit IO Feeds can accomplish for your IoT projects. For a complete overview of Adafruit IO Feeds, including tasks like downloading feed data, sharing a feed, removing erroneous data points from a feed, and more,&nbsp;[head over to the "Adafruit IO Basics: Feed" learning guide](https://learn.adafruit.com/adafruit-io-basics-feeds).

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## MicroPython Setup

You can also use this board with MicroPython and it's quite a nice experience

[This page has information and download for the most recent release of MicroPython for ESP32-C3](https://micropython.org/download/esp32c3-usb/) - just make sure you select 'USB' type since we are taking advantage of the USB port built into the C3!

You'll need esptool 3.1 or later to program the C3. Enter the ROM bootloader by holding down the BOOT button while clicking RESET button. Then upload to the serial port or COM port created.

We used a command like this to upload successfully

`esptool --chip esp32c3 --port COM3 --baud 115200 --before default_reset --after hard_reset --no-stub  write_flash --flash_mode dio --flash_freq 80m 0x0 firmware.bin`

![](https://cdn-learn.adafruit.com/assets/assets/000/109/685/medium800/adafruit_products_image.png?1647310817)

To manage and run code, we used Thonny - setup to be a **MicroPython (ESP32)** board, then pick the matching serial port.

![](https://cdn-learn.adafruit.com/assets/assets/000/109/687/medium800/adafruit_products_image.png?1647310895)

Install the `urequests` library via the Package Manager

![](https://cdn-learn.adafruit.com/assets/assets/000/109/690/medium800/adafruit_products_image.png?1647311421)

Download the following code and save it to your ESP32-C3 as `main.py`

Don't forget to change `MY_SSID` and `MY_PASSWORD` to your WiFi access point

```auto
import time
import network
import urequests
station = network.WLAN(network.STA_IF)
station.active(True)

# Network settings
wifi_ssid = "MY_SSID"
wifi_password = "MY_PASSWORD"
url = "http://wifitest.adafruit.com/testwifi/index.html"

print("Scanning for WiFi networks, please wait...")
authmodes = ['Open', 'WEP', 'WPA-PSK' 'WPA2-PSK4', 'WPA/WPA2-PSK']
for (ssid, bssid, channel, RSSI, authmode, hidden) in station.scan():
  print("* {:s}".format(ssid))
  print("   - Channel: {}".format(channel))
  print("   - RSSI: {}".format(RSSI))
  print("   - BSSID: {:02x}:{:02x}:{:02x}:{:02x}:{:02x}:{:02x}".format(*bssid))
  print()

# Continually try to connect to WiFi access point
while not station.isconnected():
    # Try to connect to WiFi access point
    print("Connecting...")
    station.connect(wifi_ssid, wifi_password)
    time.sleep(10)

# Display connection details
print("Connected!")
print("My IP Address:", station.ifconfig()[0])

# Perform HTTP GET request on a non-SSL web
response = urequests.get(url)

# Display the contents of the page
print(response.text)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/109/688/medium800/adafruit_products_image.png?1647311338)

Now click Stop and Run to load the main.py and run it, you should get the following indicating it could connect to WiFI and read the data from our webserver

![](https://cdn-learn.adafruit.com/assets/assets/000/109/689/medium800/adafruit_products_image.png?1647311255)

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Low Power Usage

This microcontroller board can be used for low power usage thanks to the ESP32's multiple sleep modes.

There are three basic operating states to Espressif chips: normal, light sleep and deep sleep.

**Normal power** usage is as you expect: you can use the chip and run code as you like - connecting to WiFi, reading sensors, etc.

**Light sleep** is sort of a 'hibernation' - power usage is minimal and WiFi is disconnected, but the internal clock and memory is kept. That means you can wake up where you left off, in the middle of the code as desired. You'll still need to re-initialize any external hardware that got disconnected, and WiFi, but it's often faster than waking from a deep sleep

**Deep sleep** is the lowest power but the tradeoff is that all memory and state is lost - the only thing that's running is the real time clock that can wake the chip up. When woken up, the chip starts as if it was physically reset - from the beginning of the code. This can be beneficial if you want to have a fresh start each time

A _rough_ guideline is:

- Normal power: 100mA+ can be as much power as need and spike during WiFi connection
- Light sleep: 2mA assuming all external hardware is de-powered
- Deep sleep: 100uA assuming all external hardware is de-powered

The ESP32-C3 does not have any spare pins so we could not add a NeoPixel power pin. The deep sleep current suffers for it but we think having a NeoPixel is so useful, its worth the current draw

Here's a generic sketch we use for all our boards that has a macro-defined section for enabling and disabling all external powered elements. For example, if there's a power pin for NeoPixels, I2C port, TFT, etc...we turn that off before going into light or deep sleep! This will minimize power usage

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Adafruit_ESP32_Arduino_Demos/ESP32_sleeptest/ESP32_sleeptest.ino

The best way to really test power draw is with a specialty power meter such as the Nordic PPK 2

### Nordic nRF-PPK2 - Power Profiler Kit II

[Nordic nRF-PPK2 - Power Profiler Kit II](https://www.adafruit.com/product/5048)
The **Power Profiler Kit II** &nbsp;is a standalone unit, which can measure and optionally supply currents all the way from sub-uA and as high as 1A on all Nordic DKs, in addition to external hardware. [As we've featured on...](https://www.youtube.com/watch?v=60q8QCiYhjc)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5048)
[Related Guides to the Product](https://learn.adafruit.com/products/5048/guides)
![Angled shot of Nordic nrF Power Profiler board.](https://cdn-shop.adafruit.com/640x480/5048-00.jpg)

When running the above code and monitoring with a PPK, you'll get a graph like this:

![](https://cdn-learn.adafruit.com/assets/assets/000/109/375/medium800/low_power_esp32_qtpy_esp32pico_sleepcycle.png?1645930315)

The big pulse is normal mode, you can see the ESP32 booting up, loading code, and then pausing 1 second. Then there's a big drop for one sec to light sleep, and finally one more 1 second pause at deep sleep.

### Normal Power Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/109/796/medium800/adafruit_products_powerwave.png?1647545283)

The power draw when running normally (no WiFi) is 20mA.

### Light Sleep Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/109/798/medium800/adafruit_products_litesleep.png?1647545779)

The power draw in light sleep is 500uA.

### Deep Sleep Mode
![](https://cdn-learn.adafruit.com/assets/assets/000/109/799/medium800/adafruit_products_deepsleep.png?1647547131)

The power draw in deep sleep is 290uA.

# Adafruit QT Py ESP32-C3 WiFi Dev Board

## Downloads

## Files:

- [ESP32-C3 datasheet](https://cdn-learn.adafruit.com/assets/assets/000/109/795/original/esp32-c3_datasheet_en.pdf?1647545180)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-QT-Py-ESP32-C3-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20QT%20Py%20ESP32-C3.fzpz)
- [3D Models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/5405%20QTPy%20ESP32%20C3)
- [PDF for QT Py ESP32-C3 PrettyPins Pinout Diagram](https://github.com/adafruit/Adafruit-QT-Py-ESP32-C3-PCB)

[SVG for QT Py ESP32-C3 PrettyPins Pinout Diagram](https://cdn-learn.adafruit.com/assets/assets/000/110/593/original/Adafruit_QT_Py_ESP32-C3_Pinout.svg?1649263784)
# 3D Model
![](https://cdn-learn.adafruit.com/assets/assets/000/111/839/medium800thumb/adafruit_products_QTPy-ESP32-C3.jpg?1652966336)

# Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/109/793/medium800/adafruit_products_QTC3_sch.png?1647545127)

![](https://cdn-learn.adafruit.com/assets/assets/000/109/794/medium800/adafruit_products_QTC3_fab_print.png?1647545164)


## Primary Products

### Adafruit QT Py ESP32-C3 WiFi Dev Board with STEMMA QT

[Adafruit QT Py ESP32-C3 WiFi Dev Board with STEMMA QT](https://www.adafruit.com/product/5405)
What's life without a little RISC? This miniature dev board is perfect for small projects: it comes with&nbsp;[our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C port, WiFi, Bluetooth® LE, and plenty of FLASH and RAM memory for many IoT...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5405)
[Related Guides to the Product](https://learn.adafruit.com/products/5405/guides)

## Featured Products

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
### Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout

[Adafruit MCP9808 High Accuracy I2C Temperature Sensor Breakout](https://www.adafruit.com/product/5027)
The MCP9808 digital temperature sensor is one of the more accurate/precise we've ever seen, with a typical accuracy of ±0.25°C over the sensor's -40°C to +125°C range and precision of +0.0625°C. They work great with any microcontroller using standard I2C. With...

In Stock
[Buy Now](https://www.adafruit.com/product/5027)
[Related Guides to the Product](https://learn.adafruit.com/products/5027/guides)

## Related Guides

- [Adafruit Trinkey QT2040](https://learn.adafruit.com/adafruit-trinkey-qt2040.md)
- [How to Add a New Sensor or Component to Adafruit IO WipperSnapper](https://learn.adafruit.com/how-to-add-a-new-component-to-adafruit-io-wippersnapper.md)
- [Adafruit QT Py ESP32 Pico](https://learn.adafruit.com/adafruit-qt-py-esp32-pico.md)
- [DeviceScript, TypeScript for Microcontrollers](https://learn.adafruit.com/devicescript.md)
- [Adafruit Feather RP2040 with DVI Output Port](https://learn.adafruit.com/adafruit-feather-rp2040-dvi.md)
- [Adafruit PiCowbell Adalogger for Pico](https://learn.adafruit.com/adafruit-picowbell-adalogger-for-pico.md)
- [Adafruit MCP9808 Precision I2C Temperature Sensor Guide](https://learn.adafruit.com/adafruit-mcp9808-precision-i2c-temperature-sensor-guide.md)
- [Adafruit ICM20649 Wide-Range 6-DoF IMU Accelerometer and Gyro](https://learn.adafruit.com/adafruit-icm20649-wide-range-6-dof-imu-accelerometer-and-gyro.md)
- [Adafruit 2.8" TFT Touch Shield v2 - Capacitive or Resistive](https://learn.adafruit.com/adafruit-2-8-tft-touch-shield-v2.md)
- [Light Meter](https://learn.adafruit.com/light-meter.md)
- [Adafruit MCP9601 I2C Thermocouple Amplifier](https://learn.adafruit.com/adafruit-mcp9601.md)
- [Adafruit Stepper + DC Motor FeatherWing](https://learn.adafruit.com/adafruit-stepper-dc-motor-featherwing.md)
- [2.2" TFT Display](https://learn.adafruit.com/2-2-tft-display.md)
- [Adafruit 1.28" 240x240 Round TFT LCD](https://learn.adafruit.com/adafruit-1-28-240x240-round-tft-lcd.md)
- [Memento Photo Capture with itsaSNAP](https://learn.adafruit.com/memento-photo-capture-with-itsasnap.md)
